Browse Source

“详情”

sunday 1 month ago
parent
commit
1e7b429daf

+ 163 - 0
Marketplace/src/main/java/com/dt/common/domain/HxwVaccineDiscussions.java

@@ -0,0 +1,163 @@
+package com.dt.common.domain;
+
+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.util.Date;
+import lombok.Data;
+
+/**
+ * hxw_疫苗讨论表:存储用户发起的疫苗相关讨论
+ * @TableName hxw_vaccine_discussions
+ */
+@TableName(value ="hxw_vaccine_discussions")
+@Data
+public class HxwVaccineDiscussions {
+    /**
+     * 讨论ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 讨论标题
+     */
+    private String title;
+
+    /**
+     * 讨论内容
+     */
+    private String content;
+
+    /**
+     * 封面图片URL
+     */
+    private String coverImageUrl;
+
+    /**
+     * 发起用户ID
+     */
+    private Integer userId;
+
+    /**
+     * 相关疫苗ID
+     */
+    private Integer vaccineId;
+
+    /**
+     * 浏览量
+     */
+    private Integer viewCount;
+
+    /**
+     * 评论数
+     */
+    private Integer commentCount;
+
+    /**
+     * 点赞数
+     */
+    private Integer likeCount;
+
+    /**
+     * 是否热门
+     */
+    private Integer isHot;
+
+    /**
+     * 是否推荐
+     */
+    private Integer isRecommended;
+
+    /**
+     * 讨论状态
+     */
+    private Object status;
+
+    /**
+     * 创建时间
+     */
+    private Date createdAt;
+
+    /**
+     * 更新时间
+     */
+    private Date updatedAt;
+
+    @TableField(exist = false)
+    private User user;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        HxwVaccineDiscussions other = (HxwVaccineDiscussions) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
+            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
+            && (this.getCoverImageUrl() == null ? other.getCoverImageUrl() == null : this.getCoverImageUrl().equals(other.getCoverImageUrl()))
+            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
+            && (this.getVaccineId() == null ? other.getVaccineId() == null : this.getVaccineId().equals(other.getVaccineId()))
+            && (this.getViewCount() == null ? other.getViewCount() == null : this.getViewCount().equals(other.getViewCount()))
+            && (this.getCommentCount() == null ? other.getCommentCount() == null : this.getCommentCount().equals(other.getCommentCount()))
+            && (this.getLikeCount() == null ? other.getLikeCount() == null : this.getLikeCount().equals(other.getLikeCount()))
+            && (this.getIsHot() == null ? other.getIsHot() == null : this.getIsHot().equals(other.getIsHot()))
+            && (this.getIsRecommended() == null ? other.getIsRecommended() == null : this.getIsRecommended().equals(other.getIsRecommended()))
+            && (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 + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
+        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
+        result = prime * result + ((getCoverImageUrl() == null) ? 0 : getCoverImageUrl().hashCode());
+        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
+        result = prime * result + ((getVaccineId() == null) ? 0 : getVaccineId().hashCode());
+        result = prime * result + ((getViewCount() == null) ? 0 : getViewCount().hashCode());
+        result = prime * result + ((getCommentCount() == null) ? 0 : getCommentCount().hashCode());
+        result = prime * result + ((getLikeCount() == null) ? 0 : getLikeCount().hashCode());
+        result = prime * result + ((getIsHot() == null) ? 0 : getIsHot().hashCode());
+        result = prime * result + ((getIsRecommended() == null) ? 0 : getIsRecommended().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(", id=").append(id);
+        sb.append(", title=").append(title);
+        sb.append(", content=").append(content);
+        sb.append(", coverImageUrl=").append(coverImageUrl);
+        sb.append(", userId=").append(userId);
+        sb.append(", vaccineId=").append(vaccineId);
+        sb.append(", viewCount=").append(viewCount);
+        sb.append(", commentCount=").append(commentCount);
+        sb.append(", likeCount=").append(likeCount);
+        sb.append(", isHot=").append(isHot);
+        sb.append(", isRecommended=").append(isRecommended);
+        sb.append(", status=").append(status);
+        sb.append(", createdAt=").append(createdAt);
+        sb.append(", updatedAt=").append(updatedAt);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 224 - 0
Marketplace/src/main/java/com/dt/common/domain/User.java

@@ -0,0 +1,224 @@
+package com.dt.common.domain;
+
+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.util.Date;
+import lombok.Data;
+
+/**
+ * 用户表
+ * @TableName user
+ */
+@TableName(value ="user")
+@Data
+public class User {
+    /**
+     * 用户ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 用户名
+     */
+    private String username;
+
+    /**
+     * 密码(BCrypt加密)
+     */
+    private String password;
+
+    /**
+     * 真实姓名
+     */
+    private String realName;
+
+    /**
+     * 手机号
+     */
+    private String phone;
+
+    /**
+     * 邮箱
+     */
+    private String email;
+
+    /**
+     * 头像URL
+     */
+    private String avatar;
+
+    /**
+     * 性别(0-未知,1-男,2-女)
+     */
+    private Integer gender;
+
+    /**
+     * 出生日期
+     */
+    private Date birthDate;
+
+    /**
+     * 状态(0-禁用,1-正常)
+     */
+    private Integer status;
+
+    /**
+     * 最后登录时间
+     */
+    private Date lastLoginTime;
+
+    /**
+     * 最后登录IP
+     */
+    private String lastLoginIp;
+
+    /**
+     * 最后登录设备
+     */
+    private String lastLoginDevice;
+
+    /**
+     * 人脸图片URL
+     */
+    private String faceImageUrl;
+
+    /**
+     * 是否启用人脸登录(0-禁用,1-启用)
+     */
+    private Integer faceLoginEnabled;
+
+    /**
+     * 创建时间
+     */
+    private Date createdAt;
+
+    /**
+     * 更新时间
+     */
+    private Date updatedAt;
+
+    /**
+     * 是否删除(0-未删除,1-已删除)
+     */
+    private Integer deleted;
+
+    /**
+     * 上次签到时间
+     */
+    private Date lastSignInTime;
+
+    /**
+     * 连续签到天数
+     */
+    private Integer continuousSignInDays;
+
+    /**
+     * 累计签到天数
+     */
+    private Integer totalSignInDays;
+
+    /**
+     * 豆豆数量
+     */
+    private Integer beans;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        User other = (User) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getUsername() == null ? other.getUsername() == null : this.getUsername().equals(other.getUsername()))
+            && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()))
+            && (this.getRealName() == null ? other.getRealName() == null : this.getRealName().equals(other.getRealName()))
+            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
+            && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
+            && (this.getAvatar() == null ? other.getAvatar() == null : this.getAvatar().equals(other.getAvatar()))
+            && (this.getGender() == null ? other.getGender() == null : this.getGender().equals(other.getGender()))
+            && (this.getBirthDate() == null ? other.getBirthDate() == null : this.getBirthDate().equals(other.getBirthDate()))
+            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
+            && (this.getLastLoginTime() == null ? other.getLastLoginTime() == null : this.getLastLoginTime().equals(other.getLastLoginTime()))
+            && (this.getLastLoginIp() == null ? other.getLastLoginIp() == null : this.getLastLoginIp().equals(other.getLastLoginIp()))
+            && (this.getLastLoginDevice() == null ? other.getLastLoginDevice() == null : this.getLastLoginDevice().equals(other.getLastLoginDevice()))
+            && (this.getFaceImageUrl() == null ? other.getFaceImageUrl() == null : this.getFaceImageUrl().equals(other.getFaceImageUrl()))
+            && (this.getFaceLoginEnabled() == null ? other.getFaceLoginEnabled() == null : this.getFaceLoginEnabled().equals(other.getFaceLoginEnabled()))
+            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
+            && (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()))
+            && (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()))
+            && (this.getLastSignInTime() == null ? other.getLastSignInTime() == null : this.getLastSignInTime().equals(other.getLastSignInTime()))
+            && (this.getContinuousSignInDays() == null ? other.getContinuousSignInDays() == null : this.getContinuousSignInDays().equals(other.getContinuousSignInDays()))
+            && (this.getTotalSignInDays() == null ? other.getTotalSignInDays() == null : this.getTotalSignInDays().equals(other.getTotalSignInDays()))
+            && (this.getBeans() == null ? other.getBeans() == null : this.getBeans().equals(other.getBeans()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getUsername() == null) ? 0 : getUsername().hashCode());
+        result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
+        result = prime * result + ((getRealName() == null) ? 0 : getRealName().hashCode());
+        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
+        result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
+        result = prime * result + ((getAvatar() == null) ? 0 : getAvatar().hashCode());
+        result = prime * result + ((getGender() == null) ? 0 : getGender().hashCode());
+        result = prime * result + ((getBirthDate() == null) ? 0 : getBirthDate().hashCode());
+        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
+        result = prime * result + ((getLastLoginTime() == null) ? 0 : getLastLoginTime().hashCode());
+        result = prime * result + ((getLastLoginIp() == null) ? 0 : getLastLoginIp().hashCode());
+        result = prime * result + ((getLastLoginDevice() == null) ? 0 : getLastLoginDevice().hashCode());
+        result = prime * result + ((getFaceImageUrl() == null) ? 0 : getFaceImageUrl().hashCode());
+        result = prime * result + ((getFaceLoginEnabled() == null) ? 0 : getFaceLoginEnabled().hashCode());
+        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
+        result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
+        result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
+        result = prime * result + ((getLastSignInTime() == null) ? 0 : getLastSignInTime().hashCode());
+        result = prime * result + ((getContinuousSignInDays() == null) ? 0 : getContinuousSignInDays().hashCode());
+        result = prime * result + ((getTotalSignInDays() == null) ? 0 : getTotalSignInDays().hashCode());
+        result = prime * result + ((getBeans() == null) ? 0 : getBeans().hashCode());
+        return result;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", username=").append(username);
+        sb.append(", password=").append(password);
+        sb.append(", realName=").append(realName);
+        sb.append(", phone=").append(phone);
+        sb.append(", email=").append(email);
+        sb.append(", avatar=").append(avatar);
+        sb.append(", gender=").append(gender);
+        sb.append(", birthDate=").append(birthDate);
+        sb.append(", status=").append(status);
+        sb.append(", lastLoginTime=").append(lastLoginTime);
+        sb.append(", lastLoginIp=").append(lastLoginIp);
+        sb.append(", lastLoginDevice=").append(lastLoginDevice);
+        sb.append(", faceImageUrl=").append(faceImageUrl);
+        sb.append(", faceLoginEnabled=").append(faceLoginEnabled);
+        sb.append(", createdAt=").append(createdAt);
+        sb.append(", updatedAt=").append(updatedAt);
+        sb.append(", deleted=").append(deleted);
+        sb.append(", lastSignInTime=").append(lastSignInTime);
+        sb.append(", continuousSignInDays=").append(continuousSignInDays);
+        sb.append(", totalSignInDays=").append(totalSignInDays);
+        sb.append(", beans=").append(beans);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 18 - 0
Marketplace/src/main/java/com/dt/common/mapper/HxwVaccineDiscussionsMapper.java

@@ -0,0 +1,18 @@
+package com.dt.common.mapper;
+
+import com.dt.common.domain.HxwVaccineDiscussions;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author sunday
+* @description 针对表【hxw_vaccine_discussions(hxw_疫苗讨论表:存储用户发起的疫苗相关讨论)】的数据库操作Mapper
+* @createDate 2025-07-11 14:41:37
+* @Entity com.dt.common.domain.HxwVaccineDiscussions
+*/
+public interface HxwVaccineDiscussionsMapper extends BaseMapper<HxwVaccineDiscussions> {
+
+}
+
+
+
+

+ 18 - 0
Marketplace/src/main/java/com/dt/common/mapper/UserMapper.java

@@ -0,0 +1,18 @@
+package com.dt.common.mapper;
+
+import com.dt.common.domain.User;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author sunday
+* @description 针对表【user(用户表)】的数据库操作Mapper
+* @createDate 2025-07-11 14:41:37
+* @Entity com.dt.common.domain.User
+*/
+public interface UserMapper extends BaseMapper<User> {
+
+}
+
+
+
+

+ 13 - 0
Marketplace/src/main/java/com/dt/common/service/HxwVaccineDiscussionsService.java

@@ -0,0 +1,13 @@
+package com.dt.common.service;
+
+import com.dt.common.domain.HxwVaccineDiscussions;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author sunday
+* @description 针对表【hxw_vaccine_discussions(hxw_疫苗讨论表:存储用户发起的疫苗相关讨论)】的数据库操作Service
+* @createDate 2025-07-11 14:41:37
+*/
+public interface HxwVaccineDiscussionsService extends IService<HxwVaccineDiscussions> {
+
+}

+ 13 - 0
Marketplace/src/main/java/com/dt/common/service/UserService.java

@@ -0,0 +1,13 @@
+package com.dt.common.service;
+
+import com.dt.common.domain.User;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author sunday
+* @description 针对表【user(用户表)】的数据库操作Service
+* @createDate 2025-07-11 14:41:37
+*/
+public interface UserService extends IService<User> {
+
+}

+ 22 - 0
Marketplace/src/main/java/com/dt/common/service/impl/HxwVaccineDiscussionsServiceImpl.java

@@ -0,0 +1,22 @@
+package com.dt.common.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dt.common.domain.HxwVaccineDiscussions;
+import com.dt.common.service.HxwVaccineDiscussionsService;
+import com.dt.common.mapper.HxwVaccineDiscussionsMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author sunday
+* @description 针对表【hxw_vaccine_discussions(hxw_疫苗讨论表:存储用户发起的疫苗相关讨论)】的数据库操作Service实现
+* @createDate 2025-07-11 14:41:37
+*/
+@Service
+public class HxwVaccineDiscussionsServiceImpl extends ServiceImpl<HxwVaccineDiscussionsMapper, HxwVaccineDiscussions>
+    implements HxwVaccineDiscussionsService{
+
+}
+
+
+
+

+ 22 - 0
Marketplace/src/main/java/com/dt/common/service/impl/UserServiceImpl.java

@@ -0,0 +1,22 @@
+package com.dt.common.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dt.common.domain.User;
+import com.dt.common.service.UserService;
+import com.dt.common.mapper.UserMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author sunday
+* @description 针对表【user(用户表)】的数据库操作Service实现
+* @createDate 2025-07-11 14:41:37
+*/
+@Service
+public class UserServiceImpl extends ServiceImpl<UserMapper, User>
+    implements UserService{
+
+}
+
+
+
+

+ 29 - 0
Marketplace/src/main/resources/com/dt/common/mapper/HxwVaccineDiscussionsMapper.xml

@@ -0,0 +1,29 @@
+<?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.dt.common.mapper.HxwVaccineDiscussionsMapper">
+
+    <resultMap id="BaseResultMap" type="com.dt.common.domain.HxwVaccineDiscussions">
+            <id property="id" column="id" />
+            <result property="title" column="title" />
+            <result property="content" column="content" />
+            <result property="coverImageUrl" column="cover_image_url" />
+            <result property="userId" column="user_id" />
+            <result property="vaccineId" column="vaccine_id" />
+            <result property="viewCount" column="view_count" />
+            <result property="commentCount" column="comment_count" />
+            <result property="likeCount" column="like_count" />
+            <result property="isHot" column="is_hot" />
+            <result property="isRecommended" column="is_recommended" />
+            <result property="status" column="status" />
+            <result property="createdAt" column="created_at" />
+            <result property="updatedAt" column="updated_at" />
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,title,content,cover_image_url,user_id,vaccine_id,
+        view_count,comment_count,like_count,is_hot,is_recommended,
+        status,created_at,updated_at
+    </sql>
+</mapper>

+ 39 - 0
Marketplace/src/main/resources/com/dt/common/mapper/UserMapper.xml

@@ -0,0 +1,39 @@
+<?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.dt.common.mapper.UserMapper">
+
+    <resultMap id="BaseResultMap" type="com.dt.common.domain.User">
+            <id property="id" column="id" />
+            <result property="username" column="username" />
+            <result property="password" column="password" />
+            <result property="realName" column="real_name" />
+            <result property="phone" column="phone" />
+            <result property="email" column="email" />
+            <result property="avatar" column="avatar" />
+            <result property="gender" column="gender" />
+            <result property="birthDate" column="birth_date" />
+            <result property="status" column="status" />
+            <result property="lastLoginTime" column="last_login_time" />
+            <result property="lastLoginIp" column="last_login_ip" />
+            <result property="lastLoginDevice" column="last_login_device" />
+            <result property="faceImageUrl" column="face_image_url" />
+            <result property="faceLoginEnabled" column="face_login_enabled" />
+            <result property="createdAt" column="created_at" />
+            <result property="updatedAt" column="updated_at" />
+            <result property="deleted" column="deleted" />
+            <result property="lastSignInTime" column="last_sign_in_time" />
+            <result property="continuousSignInDays" column="continuous_sign_in_days" />
+            <result property="totalSignInDays" column="total_sign_in_days" />
+            <result property="beans" column="beans" />
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,username,password,real_name,phone,email,
+        avatar,gender,birth_date,status,last_login_time,
+        last_login_ip,last_login_device,face_image_url,face_login_enabled,created_at,
+        updated_at,deleted,last_sign_in_time,continuous_sign_in_days,total_sign_in_days,
+        beans
+    </sql>
+</mapper>