xhb 3 months ago
parent
commit
00a2757a1d
18 changed files with 1486 additions and 0 deletions
  1. 2 0
      incubator-common/build.gradle
  2. 5 0
      incubator-game/src/main/java/com/incubator/game/constant/RedisKeyConstant.java
  3. 126 0
      incubator-game/src/main/java/com/incubator/game/data/entity/ZjBackpack.java
  4. 82 0
      incubator-game/src/main/java/com/incubator/game/data/entity/ZjClub.java
  5. 58 0
      incubator-game/src/main/java/com/incubator/game/data/entity/ZjClubMember.java
  6. 55 0
      incubator-game/src/main/java/com/incubator/game/data/entity/ZjGoods.java
  7. 36 0
      incubator-game/src/main/java/com/incubator/game/data/entity/ZjMasterscoreLog.java
  8. 70 0
      incubator-game/src/main/java/com/incubator/game/data/entity/ZjMemberAddr.java
  9. 396 0
      incubator-game/src/main/java/com/incubator/game/data/entity/ZjOrder.java
  10. 138 0
      incubator-game/src/main/java/com/incubator/game/data/entity/ZjProduct.java
  11. 54 0
      incubator-game/src/main/java/com/incubator/game/data/entity/ZjTrading.java
  12. 86 0
      incubator-game/src/main/java/com/incubator/game/data/entity/ZjUser.java
  13. 66 0
      incubator-game/src/main/java/com/incubator/game/data/entity/ZjUserGamelog.java
  14. 117 0
      incubator-game/src/main/java/com/incubator/game/data/entity/ZjUserLongin.java
  15. 63 0
      incubator-game/src/main/java/com/incubator/game/data/mq/RabbitMQUtil.java
  16. 86 0
      incubator-game/src/main/java/com/incubator/game/data/po/MessagePO.java
  17. 42 0
      incubator-game/src/main/java/com/incubator/game/handler/message/MessageInfo.java
  18. 4 0
      incubator-message/src/main/proto/CommonProto.proto

+ 2 - 0
incubator-common/build.gradle

@@ -36,6 +36,8 @@ dependencies {
     api 'it.unimi.dsi:dsiutils:2.7.3' // 数据结构和算法工具
     api 'org.reflections:reflections:0.10.2' // 反射工具
     api 'cn.hutool:hutool-all:5.8.25' // Hutool 工具包
+//    api 'org.springframework.boot:spring-boot-starter-amqp:2.6.3' //mq
+    api 'com.rabbitmq:amqp-client:5.14.2' //mq
 
     // Excel 操作
     api 'com.alibaba:easyexcel:4.0.3' // EasyExcel

+ 5 - 0
incubator-game/src/main/java/com/incubator/game/constant/RedisKeyConstant.java

@@ -27,4 +27,9 @@ public class RedisKeyConstant {
      * 查看个人活动
      */
     public static final String ZJ_USER_EVENT_KEY = "zj:user:event:activity";
+
+    /**
+     * 查看个人消息
+     */
+    public static final String ZJ_USER_MESSAGE = "zj:user:message:";
 }

+ 126 - 0
incubator-game/src/main/java/com/incubator/game/data/entity/ZjBackpack.java

@@ -0,0 +1,126 @@
+package com.incubator.game.data.entity;
+
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author WangYong
+ * @since 2024-11-11
+ */
+public class ZjBackpack implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键id
+     */
+    private String backId;
+
+    /**
+     * 用户id
+     */
+    private String userId;
+
+    /**
+     * 物品id
+     */
+    private String goodsId;
+
+    /**
+     * 物品数量
+     */
+    private BigDecimal goodsNum;
+
+
+    /**
+     * 有效期道具(0永久 1 一次性  2有效期未使用 3有效期使用 )
+     */
+//    @TableField("use_status")
+    private String useStatus;
+
+    /**
+     * 有效期道具使用后到期时间
+     */
+//    @TableField("use_time")
+    private Date useTime;
+
+    /**
+     * 是否使用 Y:N
+     */
+    private String isEmploy;
+
+    /**
+     * 机器人id
+     */
+    private String robotId;
+
+    public String getBackId() {
+        return backId;
+    }
+
+    public void setBackId(String backId) {
+        this.backId = backId;
+    }
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    public String getGoodsId() {
+        return goodsId;
+    }
+
+    public void setGoodsId(String goodsId) {
+        this.goodsId = goodsId;
+    }
+
+    public BigDecimal getGoodsNum() {
+        return goodsNum;
+    }
+
+    public void setGoodsNum(BigDecimal goodsNum) {
+        this.goodsNum = goodsNum;
+    }
+
+    public String getUseStatus() {
+        return useStatus;
+    }
+
+    public void setUseStatus(String useStatus) {
+        this.useStatus = useStatus;
+    }
+
+    public Date getUseTime() {
+        return useTime;
+    }
+
+    public void setUseTime(Date useTime) {
+        this.useTime = useTime;
+    }
+
+    public String getIsEmploy() {
+        return isEmploy;
+    }
+
+    public void setIsEmploy(String isEmploy) {
+        this.isEmploy = isEmploy;
+    }
+
+    public String getRobotId() {
+        return robotId;
+    }
+
+    public void setRobotId(String robotId) {
+        this.robotId = robotId;
+    }
+}

+ 82 - 0
incubator-game/src/main/java/com/incubator/game/data/entity/ZjClub.java

@@ -0,0 +1,82 @@
+package com.incubator.game.data.entity;
+
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * Author:  xhb
+ * Date:  2024-11-12 16:02
+*/
+public class ZjClub implements Serializable {
+    /**
+     * 主键id
+     */
+    private String clubId;
+
+    /**
+     * 俱乐部名称
+     */
+    private String clubName;
+
+    /**
+     * 俱乐部宣传图
+     */
+    private String clubImg;
+
+    /**
+     * 俱乐部人数
+     */
+    private Integer clubMemberNum;
+
+    /**
+     * 俱乐部描述
+     */
+    private String clubDescription;
+
+    /**
+     * 俱乐部掌门人
+     */
+    private String clubCreator;
+
+    /**
+     * 俱乐部状态 0 删除  1 正常 2 封禁
+     */
+    private String clubStatus;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 俱乐部地域
+     */
+    private String clubAddress;
+
+    /**
+     * 俱乐部联赛冠军club_championship
+     */
+    private Integer clubChampionship;
+
+    /**
+     * 俱乐部等级
+     */
+    private Integer clubLevel;
+
+    /**
+     * 俱乐部编号
+     */
+   private String clubNo;
+
+    /**
+     * 俱乐部大师分
+     */
+    private Integer clubMasterScore;
+
+    /**
+     * 俱乐部推广邀请人数
+     */
+    private Integer extendInviteNum;
+    private static final long serialVersionUID = 1L;
+}

+ 58 - 0
incubator-game/src/main/java/com/incubator/game/data/entity/ZjClubMember.java

@@ -0,0 +1,58 @@
+package com.incubator.game.data.entity;
+
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * Author:  xhb
+ * Date:  2024-11-12 16:02
+*/
+public class ZjClubMember implements Serializable {
+    /**
+     * 主键id
+     */
+    private String memberId;
+
+    /**
+     * 用户id
+     */
+    private String userId;
+
+    /**
+     * 俱乐部id
+     */
+    private String clubId;
+
+    /**
+     * 加入状态 0:申请加入 1:同意加入 2:拒绝加入 3:退出俱乐部 4:删除俱乐部
+     */
+    private String memberStatus;
+
+    /**
+     * 加入时间
+     */
+    private Date joinTime;
+
+    /**
+     * 退出时间
+     */
+    private Date quitTime;
+
+    /**
+     * 申请理由
+     */
+    private String requestExplain;
+
+    /**
+     * 申请渠道
+     */
+    private String requestChannel;
+
+    /**
+     * 用户归属形式
+     */
+    private String ownerType;
+
+    private static final long serialVersionUID = 1L;
+}

+ 55 - 0
incubator-game/src/main/java/com/incubator/game/data/entity/ZjGoods.java

@@ -0,0 +1,55 @@
+package com.incubator.game.data.entity;
+
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author WangYong
+ * @since 2024-11-11
+ */
+public class ZjGoods implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键id
+     */
+    private String goodsId;
+
+    /**
+     * 物品名称
+     */
+    private String goodsName;
+
+    /**
+     * 物品描述
+     */
+    private String goodsDescription;
+
+    /**
+     * 物品分类
+     */
+    private String goodsSort;
+
+    /**
+     * 物品图片
+     */
+    private String goodsImg;
+
+    private Date createTime;
+    /**
+     * 物品时效(-1永久,1:1天或1次,以此类推 或者直接填写到期时间)
+     */
+    private String goodsAgeing;
+
+    /**
+     * 物品类型(1时效  2次数)
+     */
+    private String goodsType;
+
+}

+ 36 - 0
incubator-game/src/main/java/com/incubator/game/data/entity/ZjMasterscoreLog.java

@@ -0,0 +1,36 @@
+package com.incubator.game.data.entity;
+
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author WangYong
+ * @since 2024-11-11
+ */
+public class ZjMasterscoreLog implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private String id;
+
+    private String userId;
+
+    /**
+     * 大师分
+     */
+    private Integer masterScore;
+
+    private Date createTime;
+
+    /**
+     * 类型
+     */
+    private String type;
+
+
+}

+ 70 - 0
incubator-game/src/main/java/com/incubator/game/data/entity/ZjMemberAddr.java

@@ -0,0 +1,70 @@
+package com.incubator.game.data.entity;
+
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 用户配送地址
+ * </p>
+ *
+ * @author WangYong
+ * @since 2024-11-11
+ */
+public class ZjMemberAddr implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * ID
+     */
+    private String addrId;
+
+    /**
+     * 用户ID
+     */
+    private String userId;
+
+    /**
+     * 收货人
+     */
+    private String receiver;
+
+    /**
+     * 城市
+     */
+    private String city;
+
+    /**
+     * 地址
+     */
+    private String addr;
+
+    /**
+     * 手机
+     */
+    private String mobile;
+
+    /**
+     * 状态,1正常,0无效
+     */
+    private Integer status;
+
+    /**
+     * 是否默认地址 1是
+     */
+    private Integer commonAddr;
+
+    /**
+     * 建立时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+
+}

+ 396 - 0
incubator-game/src/main/java/com/incubator/game/data/entity/ZjOrder.java

@@ -0,0 +1,396 @@
+package com.incubator.game.data.entity;
+
+
+import jdk.nashorn.internal.objects.annotations.Getter;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * <p>
+ * 订单主表
+ * </p>
+ *
+ * @author WangYong
+ * @since 2024-11-11
+ */
+public class ZjOrder implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 订单id
+     */
+    private String orderId;
+
+    /**
+     * 订单号
+     */
+    private String orderNo;
+
+    /**
+     * 商品ID
+     */
+    private String productId;
+
+    /**
+     * 商品类型  1.实物商品,2.游戏虚拟道具
+     */
+    private Integer mallType;
+
+    /**
+     * 用户id
+     */
+    private String userId;
+
+    /**
+     * 收货地址id
+     */
+    private String shippingAddress;
+
+    /**
+     * 配送方式  1.韵达,2.菜鸟
+     */
+    private String distributionMode;
+
+    /**
+     * 收货方式  1.送货上门,2.驿站自取
+     */
+    private String receiveGoodsMode;
+
+    /**
+     * 发票类型  1.不含发票,2.xx公司发票
+     */
+    private String invoiceMode;
+
+    /**
+     * 商品总金额(不含优惠折扣)
+     */
+    private BigDecimal totalPrice;
+
+    /**
+     * 订单金额(含优惠折扣)
+     */
+    private BigDecimal orderPrice;
+
+    /**
+     * 实际付款金额(包含运费)
+     */
+    private BigDecimal payPrice;
+
+    /**
+     * 买家留言
+     */
+    private String buyerRemark;
+
+    /**
+     * 支付方式(1 微信支付  2  其他支付)
+     */
+    private String payType;
+
+    /**
+     * 付款状态(N未付款 Y已付款)
+     */
+    private String payStatus;
+
+    /**
+     * 付款时间
+     */
+    private String payTime;
+
+    /**
+     * 订单状态( 0  取消  1 进行中 2 待取消 3 已完成)
+     */
+    private String orderStatus;
+
+    /**
+     * 订单是否已结算(N未结算 Y已结算)
+     */
+    private String isSettled;
+
+    /**
+     * 微信支付交易号
+     */
+    private String transactionId;
+
+    /**
+     * 是否删除
+     */
+    private Integer isDelete;
+
+    /**
+     * 创建时间
+     */
+    private String createTime;
+
+    /**
+     * 更新时间
+     */
+    private String updateTime;
+
+    /**
+     * 失效时间
+     */
+    private String failureTime;
+    /**
+     * 物流单号
+     */
+    private String distributionNo;
+
+    /**
+     * 流入金额
+     */
+    private BigDecimal inflowAmount;
+
+    /**
+     * 流出金额
+     */
+    private BigDecimal outflowAmount;
+
+    /**
+     * 订单描述(1:道具购买,2:钻石充值,3:金蛋购买,4:角色购买,5:实体商品购买)
+     */
+    private String orderType;
+
+    /**
+     * 商户信息
+     */
+    private String merchantInfo;
+
+    /**
+     * 商品名字
+     */
+    private String productName;
+
+    public String getOrderId() {
+        return orderId;
+    }
+
+    public void setOrderId(String orderId) {
+        this.orderId = orderId;
+    }
+
+    public String getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(String orderNo) {
+        this.orderNo = orderNo;
+    }
+
+    public String getProductId() {
+        return productId;
+    }
+
+    public void setProductId(String productId) {
+        this.productId = productId;
+    }
+
+    public Integer getMallType() {
+        return mallType;
+    }
+
+    public void setMallType(Integer mallType) {
+        this.mallType = mallType;
+    }
+
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    public String getShippingAddress() {
+        return shippingAddress;
+    }
+
+    public void setShippingAddress(String shippingAddress) {
+        this.shippingAddress = shippingAddress;
+    }
+
+    public String getDistributionMode() {
+        return distributionMode;
+    }
+
+    public void setDistributionMode(String distributionMode) {
+        this.distributionMode = distributionMode;
+    }
+
+    public String getReceiveGoodsMode() {
+        return receiveGoodsMode;
+    }
+
+    public void setReceiveGoodsMode(String receiveGoodsMode) {
+        this.receiveGoodsMode = receiveGoodsMode;
+    }
+
+    public String getInvoiceMode() {
+        return invoiceMode;
+    }
+
+    public void setInvoiceMode(String invoiceMode) {
+        this.invoiceMode = invoiceMode;
+    }
+
+    public BigDecimal getTotalPrice() {
+        return totalPrice;
+    }
+
+    public void setTotalPrice(BigDecimal totalPrice) {
+        this.totalPrice = totalPrice;
+    }
+
+    public BigDecimal getOrderPrice() {
+        return orderPrice;
+    }
+
+    public void setOrderPrice(BigDecimal orderPrice) {
+        this.orderPrice = orderPrice;
+    }
+
+    public BigDecimal getPayPrice() {
+        return payPrice;
+    }
+
+    public void setPayPrice(BigDecimal payPrice) {
+        this.payPrice = payPrice;
+    }
+
+    public String getBuyerRemark() {
+        return buyerRemark;
+    }
+
+    public void setBuyerRemark(String buyerRemark) {
+        this.buyerRemark = buyerRemark;
+    }
+
+    public String getPayType() {
+        return payType;
+    }
+
+    public void setPayType(String payType) {
+        this.payType = payType;
+    }
+
+    public String getPayStatus() {
+        return payStatus;
+    }
+
+    public void setPayStatus(String payStatus) {
+        this.payStatus = payStatus;
+    }
+
+    public String getPayTime() {
+        return payTime;
+    }
+
+    public void setPayTime(String payTime) {
+        this.payTime = payTime;
+    }
+
+    public String getOrderStatus() {
+        return orderStatus;
+    }
+
+    public void setOrderStatus(String orderStatus) {
+        this.orderStatus = orderStatus;
+    }
+
+    public String getIsSettled() {
+        return isSettled;
+    }
+
+    public void setIsSettled(String isSettled) {
+        this.isSettled = isSettled;
+    }
+
+    public String getTransactionId() {
+        return transactionId;
+    }
+
+    public void setTransactionId(String transactionId) {
+        this.transactionId = transactionId;
+    }
+
+    public Integer getIsDelete() {
+        return isDelete;
+    }
+
+    public void setIsDelete(Integer isDelete) {
+        this.isDelete = isDelete;
+    }
+
+    public String getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(String createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(String updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getFailureTime() {
+        return failureTime;
+    }
+
+    public void setFailureTime(String failureTime) {
+        this.failureTime = failureTime;
+    }
+
+    public String getDistributionNo() {
+        return distributionNo;
+    }
+
+    public void setDistributionNo(String distributionNo) {
+        this.distributionNo = distributionNo;
+    }
+
+    public BigDecimal getInflowAmount() {
+        return inflowAmount;
+    }
+
+    public void setInflowAmount(BigDecimal inflowAmount) {
+        this.inflowAmount = inflowAmount;
+    }
+
+    public BigDecimal getOutflowAmount() {
+        return outflowAmount;
+    }
+
+    public void setOutflowAmount(BigDecimal outflowAmount) {
+        this.outflowAmount = outflowAmount;
+    }
+
+    public String getOrderType() {
+        return orderType;
+    }
+
+    public void setOrderType(String orderType) {
+        this.orderType = orderType;
+    }
+
+    public String getMerchantInfo() {
+        return merchantInfo;
+    }
+
+    public void setMerchantInfo(String merchantInfo) {
+        this.merchantInfo = merchantInfo;
+    }
+
+    public String getProductName() {
+        return productName;
+    }
+
+    public void setProductName(String productName) {
+        this.productName = productName;
+    }
+}

+ 138 - 0
incubator-game/src/main/java/com/incubator/game/data/entity/ZjProduct.java

@@ -0,0 +1,138 @@
+package com.incubator.game.data.entity;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * Author:  xhb
+ * Date:  2024-11-12 10:42
+*/
+public class ZjProduct implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 主键id
+    */
+    private String productId;
+
+    /**
+     * 商品编号
+     */
+    private String productNo;
+
+    /**
+    * 商品名称
+    */
+    private String productName;
+
+    /**
+    * 商品图片
+    */
+    private String productImg;
+
+    /**
+    * 商品描述
+    */
+    private String productDescription;
+
+    /**
+    * 商品类型关联类型表id
+    */
+    private String productType;
+
+    /**
+    * 商品单价
+    */
+    private BigDecimal productPrice;
+
+    /**
+    * 商品状态 Y:N:D
+    */
+    private String productStatus;
+
+    /**
+    * 商品数量
+    */
+    private Integer productCount;
+
+    /**
+    * 商品交易数量
+    */
+    private Integer productTrade;
+
+    /**
+    * 兑换开始时间
+    */
+    private Date productBeginTime;
+
+    /**
+    * 兑换结束时间
+    */
+    private Date productEndTime;
+
+    /**
+    * 兑换列表
+    */
+    private String productList;
+
+    /**
+    * 商品单位(1人民币 2钻石 3福卡)
+    */
+    private String productUnit;
+    /**
+     * 商品对应的物品id
+     */
+    private String productGoods;
+
+    /**
+     * 限购
+     */
+    private String purchaseLimitation;
+
+    /**
+    * 创建时间
+    */
+    private Date createTime;
+
+    /**
+    * 创建人
+    */
+    private Integer createPeople;
+
+    /**
+    * 修改时间
+    */
+    private Date updateTime;
+
+    /**
+    * 修改人
+    */
+    private Integer updatePeople;
+
+    /**
+     * 商品标注
+     */
+    private String productLabel;
+
+    /**
+     * 商品售价
+     */
+    private BigDecimal productSellPrice;
+
+    /**
+     * 商品限购数量
+     */
+    private Integer productLimitationNum;
+
+    /**
+     * 商品栏目分类
+     */
+    private Integer columnSort;
+
+    /**
+     * 使用抵扣券规则
+     */
+    private String deductionRule;
+}

+ 54 - 0
incubator-game/src/main/java/com/incubator/game/data/entity/ZjTrading.java

@@ -0,0 +1,54 @@
+package com.incubator.game.data.entity;
+
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * Author:  xhb
+ * Date:  2024-11-19 11:46
+*/
+public class ZjTrading implements Serializable {
+    /**
+     * 主键id
+     */
+    private String tradingId;
+
+    /**
+     * 用户ID
+     */
+    private String userId;
+
+    /**
+     * 订单号
+     */
+    private String orderNo;
+
+    /**
+     * 交易金额
+     */
+    private BigDecimal amount;
+
+    /**
+     * 交易时间
+     */
+    private Date transactionTime;
+
+    /**
+     * 交易描述
+     */
+    private String description;
+
+    /**
+     * 收支类型1 收入, 2支出
+     */
+    private String type;
+
+    /**
+     * 交易类型 1 购买,2赠送
+     */
+    private String tradeType;
+
+    private static final long serialVersionUID = 1L;
+}

+ 86 - 0
incubator-game/src/main/java/com/incubator/game/data/entity/ZjUser.java

@@ -0,0 +1,86 @@
+package com.incubator.game.data.entity;
+
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author WangYong
+ * @since 2024-11-08
+ */
+public class ZjUser implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private String userId;
+
+    /**
+     * 昵称
+     */
+    private String nickName;
+
+    /**
+     * 头像
+     */
+    private String avatarUrl;
+
+    /**
+     * 大师等级
+     */
+    private Integer honorLevel;
+    /**
+     * 等级最大分
+     */
+    private Integer masterScoreLevel;
+
+    /**
+     * 大师分
+     */
+    private Integer masterScore;
+
+    /**
+     * 系统排名
+     */
+    private Integer ranking;
+
+    /**
+     * 性别
+     */
+    private String sex;
+
+
+
+    private Date createTime;
+
+    /**
+     * 充值金钱
+     */
+    private BigDecimal rmb = BigDecimal.ZERO;
+
+    /**
+     * 主俱乐部
+     */
+    private String userClub;
+
+    /**
+     * 魅力
+     */
+    private Integer charm;
+
+    /**
+     * 玩家编号
+     */
+    private String userNo;
+
+    /**
+     * 人物形象
+     */
+    private String characterUrl;
+
+
+}

+ 66 - 0
incubator-game/src/main/java/com/incubator/game/data/entity/ZjUserGamelog.java

@@ -0,0 +1,66 @@
+package com.incubator.game.data.entity;
+
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author WangYong
+ * @since 2024-11-08
+ */
+public class ZjUserGamelog implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private String id;
+
+    private String userId;
+
+    /**
+     * 登录时间
+     */
+    private Date loginTime;
+
+    /**
+     * 退出时间
+     */
+    private Date exitTime;
+
+    /**
+     * 日期
+     */
+    private Date logDate;
+
+    /**
+     * 登录ip
+     */
+    private String loginIp;
+
+    /**
+     * 登录设备
+     */
+    private String loginDevice;
+
+    /**
+     * 充值数据
+     */
+    private String rechargeData;
+
+    /**
+     * 账号数据
+     */
+    private String accountData;
+
+    private Date createTime;
+
+    /**
+     * 赠送描述
+     */
+    private String giftDescription;
+
+}

+ 117 - 0
incubator-game/src/main/java/com/incubator/game/data/entity/ZjUserLongin.java

@@ -0,0 +1,117 @@
+package com.incubator.game.data.entity;
+
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author WangYong
+ * @since 2024-11-08
+ */
+public class ZjUserLongin implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    private String loginId;
+
+    private String userId;
+
+    /**
+     * 手机号
+     */
+    private String phoneNumber;
+
+    /**
+     * 微信opid
+     */
+    private String wxOpenId;
+
+    /**
+     * 密码
+     */
+    private String password;
+
+    /**
+     * 邮箱
+     */
+    private String email;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 最近登录时间
+     */
+    private Date loginTime;
+
+    /**
+     * 状态
+     */
+    private String status;
+
+    /**
+     * 修改时间
+     */
+    private Date updateTime;
+
+    /**
+     * 定位
+     */
+    private String gps;
+
+    /**
+     * 定位位置详情
+     */
+    private String gpsAddr;
+
+    /**
+     * 身份证号
+     */
+    private String certNo;
+
+    /**
+     * 真实姓名
+     */
+    private String name;
+
+    /**
+     * 微信id
+     */
+    private String wxId;
+
+    /**
+     * 登录ip
+     */
+    private String loginIp;
+
+    /**
+     * 登录设备
+     */
+    private String loginDevice;
+
+    /**
+     * 冻结状态(0正常 ...)
+     */
+    private String freeze;
+
+    /**
+     * 冻结时间
+     */
+    private Date freezeTime;
+
+    /**
+     * 解冻时间
+     */
+    private Date thawTime;
+
+    /**
+     * 零时账户
+     */
+    private String account;
+}

+ 63 - 0
incubator-game/src/main/java/com/incubator/game/data/mq/RabbitMQUtil.java

@@ -0,0 +1,63 @@
+package com.incubator.game.data.mq;
+
+import com.rabbitmq.client.Channel;
+import com.rabbitmq.client.Connection;
+import com.rabbitmq.client.ConnectionFactory;
+
+public class RabbitMQUtil {
+
+    private static final String EXCHANGE_NAME = "zj_exchange";
+    private static final String QUEUE_NAME = "zj_queue";
+    private static final String ROUTING_KEY = "zj_routing_key";
+
+    private static Connection connection;
+    private static Channel channel;
+
+    static {
+        try {
+            // 初始化连接和通道
+            initializeConnectionAndChannel();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    private static void initializeConnectionAndChannel() throws Exception {
+        ConnectionFactory factory = new ConnectionFactory();
+        factory.setHost("localhost");
+        factory.setPort(5672);
+        factory.setUsername("guest");
+        factory.setPassword("guest");
+
+        connection = factory.newConnection();
+        channel = connection.createChannel();
+
+        // 声明交换机
+        channel.exchangeDeclare(EXCHANGE_NAME, "direct",true);
+
+        // 声明队列
+        channel.queueDeclare(QUEUE_NAME, true, false, false, null);
+
+        // 绑定队列到交换机
+        channel.queueBind(QUEUE_NAME, EXCHANGE_NAME, ROUTING_KEY);
+    }
+
+    public static void sendMessage(String message) throws Exception {
+        // 发送消息
+        channel.basicPublish(EXCHANGE_NAME, ROUTING_KEY, null, message.getBytes());
+        System.out.println("Sent message: " + message);
+    }
+
+    public static void closeConnection() {
+        try {
+            if (channel != null && channel.isOpen()) {
+                channel.close();
+            }
+            if (connection != null && connection.isOpen()) {
+                connection.close();
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+}

+ 86 - 0
incubator-game/src/main/java/com/incubator/game/data/po/MessagePO.java

@@ -0,0 +1,86 @@
+package com.incubator.game.data.po;
+
+/**
+ * Author:  xhb
+ * Date:  2024-12-17 10:24
+ */
+public class MessagePO {
+
+    /**
+     * 消息id
+     */
+    private String id;
+
+    /**
+     * 消息头
+     */
+    private String title;
+
+    /**
+     * 消息类型
+     */
+    private String type;
+
+    /**
+     * 消息内容
+     */
+    private String content;
+
+    /**
+     * 消息时间
+     */
+    private String createTime;
+
+    /**
+     * 消息状态
+     */
+    private String status;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    public String getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(String createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+}

+ 42 - 0
incubator-game/src/main/java/com/incubator/game/handler/message/MessageInfo.java

@@ -0,0 +1,42 @@
+package com.incubator.game.handler.message;
+
+import cn.hutool.json.JSON;
+import cn.hutool.json.JSONArray;
+import cn.hutool.json.JSONObject;
+import cn.hutool.json.JSONUtil;
+import com.incubator.common.MessageHandler;
+import com.incubator.common.net.Connection;
+import com.incubator.core.net.ws.NetHandler;
+import com.incubator.core.net.ws.WSRequest;
+import com.incubator.core.net.ws.WSResponse;
+import com.incubator.game.constant.RedisKeyConstant;
+import com.incubator.game.data.jedis.RedisUtil;
+import com.incubator.game.data.po.MessagePO;
+import com.incubator.game.util.ObjectMapperUtil;
+import com.incubator.message.proto.CommonProto;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Author:  xhb
+ * Date:  2024-12-17 9:59
+ */
+@MessageHandler(id = CommonProto.Cmd.MessageInfoReq_VALUE)
+public class MessageInfo extends NetHandler {
+
+    @Override
+    public void onDate(Connection session, WSRequest request, WSResponse response) {
+        response.setCmd(CommonProto.Cmd.MessageInfoRes_VALUE);
+        String userId = session.getPlayerId();
+        String jsonStr = RedisUtil.get(RedisKeyConstant.ZJ_USER_MESSAGE + userId);
+        JSONObject parse = JSONUtil.parseObj(jsonStr);
+        JSONArray jsonArray = parse.getJSONArray("");
+        List<MessagePO> messagePOS = jsonArray.toList(MessagePO.class);
+        List<Map<String, Object>> maps = ObjectMapperUtil.convertListToMapList(messagePOS);
+        Map<String, Object> map = new HashMap<>();
+        map.put("messageList", maps);
+        response.setData(map);
+    }
+}

+ 4 - 0
incubator-message/src/main/proto/CommonProto.proto

@@ -131,6 +131,10 @@ enum Cmd {
     EventInfoReq = 200801;     // 活动信息请求
     EventInfoRes = 200802;     // 活动信息响应
 
+    //个人消息
+    MessageInfoReq = 200901;     // 个人消息信息请求
+    MessageInfoRes = 200902;     // 个人消息信息响应
+
 
     // 服务器推送消息 900000-999999 (全部以偶数结尾)
     PlayerInfoUpdate = 900002;  // 玩家信息数据变更推送