lzy 3 weeks ago
parent
commit
38f5742e2a

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

@@ -1,134 +0,0 @@
-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();
-    }
-}

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

@@ -209,11 +209,3 @@ public class GroupsServiceImpl extends ServiceImpl<GroupsMapper, Groupss>
 
 
 
 
 }
 }
-
-
-
-
-<<<<<<< HEAD
-
-=======
->>>>>>> bb9ed99 ('lzy1')

+ 2 - 2
src/main/java/com/zhentao/user/controller/UserController.java

@@ -64,8 +64,8 @@ public class UserController {
     @PostMapping("/UserPassLogin")
     @PostMapping("/UserPassLogin")
     @NullLogin
     @NullLogin
     public Result UserPassLogin(@RequestBody @Valid UserPassDto userPassDto) {
     public Result UserPassLogin(@RequestBody @Valid UserPassDto userPassDto) {
-        Result result = userLoginService.UserPassLogin(userPassDto);
-        return result;
+
+        return userLoginService.UserPassLogin(userPassDto);
     }
     }
 
 
 //    忘记密码
 //    忘记密码

+ 2 - 1
src/main/java/com/zhentao/user/service/impl/UserLoginServiceImpl.java

@@ -187,7 +187,7 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginMapper, UserLogin
      */
      */
     @Override
     @Override
     public Result UserPassLogin(UserPassDto userPassDto) {
     public Result UserPassLogin(UserPassDto userPassDto) {
-        System.err.println(userPassDto);
+//        System.err.println(userPassDto);
         // 获取Redisson客户端的锁对象,用于处理并发登录请求
         // 获取Redisson客户端的锁对象,用于处理并发登录请求
         RLock lock = redissonClient.getLock("user"+userPassDto.getUsername());
         RLock lock = redissonClient.getLock("user"+userPassDto.getUsername());
         try {
         try {
@@ -198,6 +198,7 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginMapper, UserLogin
                 QueryWrapper<UserLogin> queryWrapper = new QueryWrapper<>();
                 QueryWrapper<UserLogin> queryWrapper = new QueryWrapper<>();
                 queryWrapper.eq("user_username",userPassDto.getUsername());
                 queryWrapper.eq("user_username",userPassDto.getUsername());
                 UserLogin one = this.getOne(queryWrapper);
                 UserLogin one = this.getOne(queryWrapper);
+                System.err.println(one.toString());
                 // 如果用户不存在,抛出异常
                 // 如果用户不存在,抛出异常
                 if (one==null){
                 if (one==null){
                     throw new AsynException(ApiServerException.NULL_USERNAME);
                     throw new AsynException(ApiServerException.NULL_USERNAME);