lzy hai 1 mes
pai
achega
85d5ce382b

+ 2 - 2
src/main/java/com/zhentao/groups/pojo/GroupMembers.java

@@ -19,7 +19,7 @@ import lombok.Data;
 @Data
 public class GroupMembers implements Serializable {
     /**
-     * 
+     *
      */
     @JsonFormat(shape = JsonFormat.Shape.STRING)
     @TableId
@@ -113,4 +113,4 @@ public class GroupMembers implements Serializable {
         sb.append("]");
         return sb.toString();
     }
-}
+}

+ 134 - 0
src/main/java/com/zhentao/groups/pojo/Groups.java

@@ -0,0 +1,134 @@
+package com.zhentao.groups.pojo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Data;
+
+/**
+ * 群组表
+ * @TableName groups
+ */
+@TableName(value ="groups")
+@Data
+public class Groups implements Serializable {
+    /**
+     * id
+
+     */
+    @TableId(type = IdType.AUTO)
+    private Long groupId;
+
+    /**
+     * 群名称
+     */
+    private String name;
+
+    /**
+     * 创建者ID
+     */
+    private Long creatorId;
+
+    /**
+     * 群头像
+     */
+    private String avatar;
+
+    /**
+     * 群公告
+     */
+    private String announcement;
+
+    /**
+     * 群描述
+     */
+    private String description;
+
+    /**
+     * 最大成员数
+     */
+    private Integer maxMembers;
+
+    /**
+     * 状态(0-解散,1-正常)
+     */
+    private Integer status;
+
+    /**
+     * 创建时间
+     */
+    private Date createdAt;
+
+    /**
+     * 修改时间
+     */
+    private Date updatedAt;
+
+    @TableField(exist = false)
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        Groups other = (Groups) that;
+        return (this.getGroupId() == null ? other.getGroupId() == null : this.getGroupId().equals(other.getGroupId()))
+            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
+            && (this.getCreatorId() == null ? other.getCreatorId() == null : this.getCreatorId().equals(other.getCreatorId()))
+            && (this.getAvatar() == null ? other.getAvatar() == null : this.getAvatar().equals(other.getAvatar()))
+            && (this.getAnnouncement() == null ? other.getAnnouncement() == null : this.getAnnouncement().equals(other.getAnnouncement()))
+            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
+            && (this.getMaxMembers() == null ? other.getMaxMembers() == null : this.getMaxMembers().equals(other.getMaxMembers()))
+            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
+            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
+            && (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getGroupId() == null) ? 0 : getGroupId().hashCode());
+        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
+        result = prime * result + ((getCreatorId() == null) ? 0 : getCreatorId().hashCode());
+        result = prime * result + ((getAvatar() == null) ? 0 : getAvatar().hashCode());
+        result = prime * result + ((getAnnouncement() == null) ? 0 : getAnnouncement().hashCode());
+        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
+        result = prime * result + ((getMaxMembers() == null) ? 0 : getMaxMembers().hashCode());
+        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
+        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
+        result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", groupId=").append(groupId);
+        sb.append(", name=").append(name);
+        sb.append(", creatorId=").append(creatorId);
+        sb.append(", avatar=").append(avatar);
+        sb.append(", announcement=").append(announcement);
+        sb.append(", description=").append(description);
+        sb.append(", maxMembers=").append(maxMembers);
+        sb.append(", status=").append(status);
+        sb.append(", createdAt=").append(createdAt);
+        sb.append(", updatedAt=").append(updatedAt);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 3 - 0
src/main/java/com/zhentao/groups/service/impl/GroupsServiceImpl.java

@@ -213,4 +213,7 @@ public class GroupsServiceImpl extends ServiceImpl<GroupsMapper, Groupss>
 
 
 
+<<<<<<< HEAD
 
+=======
+>>>>>>> bb9ed99 ('lzy1')

+ 2 - 2
src/main/resources/mapper/GroupsMapper.xml

@@ -2,9 +2,9 @@
 <!DOCTYPE mapper
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.zhentao.groups.mapper.GroupsMapper">
+<mapper namespace="com.zhentao.shouye.mapper.GroupsMapper">
 
-    <resultMap id="BaseResultMap" type="com.zhentao.groups.pojo.Groupss">
+    <resultMap id="BaseResultMap" type="com.zhentao.shouye.domain.Groups">
             <id property="groupId" column="group_id" jdbcType="BIGINT"/>
             <result property="name" column="name" jdbcType="VARCHAR"/>
             <result property="creatorId" column="creator_id" jdbcType="BIGINT"/>