lzy 4 days ago
parent
commit
dc8035c0f8
100 changed files with 4373 additions and 0 deletions
  1. 33 0
      .gitignore
  2. 170 0
      pom.xml
  3. 15 0
      src/main/java/com/dt/MarketplaceApplication.java
  4. 42 0
      src/main/java/com/dt/child/controller/ChildController.java
  5. 37 0
      src/main/java/com/dt/child/controller/VideoController.java
  6. 120 0
      src/main/java/com/dt/common/domain/AbnormalRecord.java
  7. 80 0
      src/main/java/com/dt/common/domain/CaregiverGroup.java
  8. 149 0
      src/main/java/com/dt/common/domain/Child.java
  9. 96 0
      src/main/java/com/dt/common/domain/ChildGroup.java
  10. 120 0
      src/main/java/com/dt/common/domain/FoodRecord.java
  11. 121 0
      src/main/java/com/dt/common/domain/GrowthRecord.java
  12. 112 0
      src/main/java/com/dt/common/domain/Message.java
  13. 112 0
      src/main/java/com/dt/common/domain/MilestoneRecord.java
  14. 136 0
      src/main/java/com/dt/common/domain/Notice.java
  15. 80 0
      src/main/java/com/dt/common/domain/NoticeRead.java
  16. 112 0
      src/main/java/com/dt/common/domain/OperationLog.java
  17. 96 0
      src/main/java/com/dt/common/domain/ParentChild.java
  18. 112 0
      src/main/java/com/dt/common/domain/SleepRecord.java
  19. 88 0
      src/main/java/com/dt/common/domain/SystemConfig.java
  20. 113 0
      src/main/java/com/dt/common/domain/TemperatureRecord.java
  21. 112 0
      src/main/java/com/dt/common/domain/ToiletRecord.java
  22. 192 0
      src/main/java/com/dt/common/domain/User.java
  23. 124 0
      src/main/java/com/dt/common/domain/Video.java
  24. 18 0
      src/main/java/com/dt/common/mapper/AbnormalRecordMapper.java
  25. 18 0
      src/main/java/com/dt/common/mapper/CaregiverGroupMapper.java
  26. 18 0
      src/main/java/com/dt/common/mapper/ChildGroupMapper.java
  27. 18 0
      src/main/java/com/dt/common/mapper/ChildMapper.java
  28. 18 0
      src/main/java/com/dt/common/mapper/FoodRecordMapper.java
  29. 18 0
      src/main/java/com/dt/common/mapper/GrowthRecordMapper.java
  30. 18 0
      src/main/java/com/dt/common/mapper/MessageMapper.java
  31. 18 0
      src/main/java/com/dt/common/mapper/MilestoneRecordMapper.java
  32. 18 0
      src/main/java/com/dt/common/mapper/NoticeMapper.java
  33. 18 0
      src/main/java/com/dt/common/mapper/NoticeReadMapper.java
  34. 18 0
      src/main/java/com/dt/common/mapper/OperationLogMapper.java
  35. 18 0
      src/main/java/com/dt/common/mapper/ParentChildMapper.java
  36. 18 0
      src/main/java/com/dt/common/mapper/SleepRecordMapper.java
  37. 18 0
      src/main/java/com/dt/common/mapper/SystemConfigMapper.java
  38. 18 0
      src/main/java/com/dt/common/mapper/TemperatureRecordMapper.java
  39. 18 0
      src/main/java/com/dt/common/mapper/ToiletRecordMapper.java
  40. 18 0
      src/main/java/com/dt/common/mapper/UserMapper.java
  41. 18 0
      src/main/java/com/dt/common/mapper/VideoMapper.java
  42. 13 0
      src/main/java/com/dt/common/service/AbnormalRecordService.java
  43. 13 0
      src/main/java/com/dt/common/service/CaregiverGroupService.java
  44. 13 0
      src/main/java/com/dt/common/service/ChildGroupService.java
  45. 18 0
      src/main/java/com/dt/common/service/ChildService.java
  46. 13 0
      src/main/java/com/dt/common/service/FoodRecordService.java
  47. 13 0
      src/main/java/com/dt/common/service/GrowthRecordService.java
  48. 13 0
      src/main/java/com/dt/common/service/MessageService.java
  49. 13 0
      src/main/java/com/dt/common/service/MilestoneRecordService.java
  50. 13 0
      src/main/java/com/dt/common/service/NoticeReadService.java
  51. 13 0
      src/main/java/com/dt/common/service/NoticeService.java
  52. 13 0
      src/main/java/com/dt/common/service/OperationLogService.java
  53. 13 0
      src/main/java/com/dt/common/service/ParentChildService.java
  54. 13 0
      src/main/java/com/dt/common/service/SleepRecordService.java
  55. 13 0
      src/main/java/com/dt/common/service/SystemConfigService.java
  56. 13 0
      src/main/java/com/dt/common/service/TemperatureRecordService.java
  57. 13 0
      src/main/java/com/dt/common/service/ToiletRecordService.java
  58. 13 0
      src/main/java/com/dt/common/service/UserService.java
  59. 25 0
      src/main/java/com/dt/common/service/VideoService.java
  60. 22 0
      src/main/java/com/dt/common/service/impl/AbnormalRecordServiceImpl.java
  61. 22 0
      src/main/java/com/dt/common/service/impl/CaregiverGroupServiceImpl.java
  62. 22 0
      src/main/java/com/dt/common/service/impl/ChildGroupServiceImpl.java
  63. 93 0
      src/main/java/com/dt/common/service/impl/ChildServiceImpl.java
  64. 22 0
      src/main/java/com/dt/common/service/impl/FoodRecordServiceImpl.java
  65. 22 0
      src/main/java/com/dt/common/service/impl/GrowthRecordServiceImpl.java
  66. 22 0
      src/main/java/com/dt/common/service/impl/MessageServiceImpl.java
  67. 22 0
      src/main/java/com/dt/common/service/impl/MilestoneRecordServiceImpl.java
  68. 22 0
      src/main/java/com/dt/common/service/impl/NoticeReadServiceImpl.java
  69. 22 0
      src/main/java/com/dt/common/service/impl/NoticeServiceImpl.java
  70. 22 0
      src/main/java/com/dt/common/service/impl/OperationLogServiceImpl.java
  71. 22 0
      src/main/java/com/dt/common/service/impl/ParentChildServiceImpl.java
  72. 22 0
      src/main/java/com/dt/common/service/impl/SleepRecordServiceImpl.java
  73. 22 0
      src/main/java/com/dt/common/service/impl/SystemConfigServiceImpl.java
  74. 22 0
      src/main/java/com/dt/common/service/impl/TemperatureRecordServiceImpl.java
  75. 22 0
      src/main/java/com/dt/common/service/impl/ToiletRecordServiceImpl.java
  76. 22 0
      src/main/java/com/dt/common/service/impl/UserServiceImpl.java
  77. 57 0
      src/main/java/com/dt/common/service/impl/VideoServiceImpl.java
  78. 27 0
      src/main/java/com/dt/config/ApiException.java
  79. 18 0
      src/main/java/com/dt/config/BaseExceptionEnum.java
  80. 6 0
      src/main/java/com/dt/config/CommonContants.java
  81. 11 0
      src/main/java/com/dt/config/NonLoginRequired.java
  82. 21 0
      src/main/java/com/dt/config/WebMvcConfig.java
  83. 63 0
      src/main/java/com/dt/dto/AddVideoDto.java
  84. 79 0
      src/main/java/com/dt/intercepter/AuthIntercepter.java
  85. 119 0
      src/main/java/com/dt/oss/OSSService.java
  86. 37 0
      src/main/java/com/dt/oss/controller/OSSController.java
  87. 67 0
      src/main/java/com/dt/util/Md5Utils.java
  88. 64 0
      src/main/java/com/dt/util/RRException.java
  89. 113 0
      src/main/java/com/dt/util/TokenUtils.java
  90. 34 0
      src/main/java/com/dt/vo/Result.java
  91. 66 0
      src/main/resources/application.yml
  92. 23 0
      src/main/resources/com/dt/common/mapper/AbnormalRecordMapper.xml
  93. 17 0
      src/main/resources/com/dt/common/mapper/CaregiverGroupMapper.xml
  94. 19 0
      src/main/resources/com/dt/common/mapper/ChildGroupMapper.xml
  95. 25 0
      src/main/resources/com/dt/common/mapper/ChildMapper.xml
  96. 23 0
      src/main/resources/com/dt/common/mapper/FoodRecordMapper.xml
  97. 23 0
      src/main/resources/com/dt/common/mapper/GrowthRecordMapper.xml
  98. 22 0
      src/main/resources/com/dt/common/mapper/MessageMapper.xml
  99. 22 0
      src/main/resources/com/dt/common/mapper/MilestoneRecordMapper.xml
  100. 25 0
      src/main/resources/com/dt/common/mapper/NoticeMapper.xml

+ 33 - 0
.gitignore

@@ -0,0 +1,33 @@
+HELP.md
+target/
+!.mvn/wrapper/maven-wrapper.jar
+!**/src/main/**/target/
+!**/src/test/**/target/
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+build/
+!**/src/main/**/build/
+!**/src/test/**/build/
+
+### VS Code ###
+.vscode/

+ 170 - 0
pom.xml

@@ -0,0 +1,170 @@
+<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>com.dt</groupId>
+    <artifactId>Marketplace</artifactId>
+    <version>0.0.1-SNAPSHOT</version>
+    <name>Marketplace</name>
+    <description>Marketplace</description>
+    <properties>
+        <java.version>1.8</java.version>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <spring-boot.version>2.7.6</spring-boot.version>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-validation</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>5.8.16</version>
+        </dependency>
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+            <version>3.5.4</version>
+        </dependency>
+
+
+        <dependency>
+            <groupId>org.redisson</groupId>
+            <artifactId>redisson-spring-boot-starter</artifactId>
+            <version>3.21.3</version>
+        </dependency>
+
+
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt</artifactId>
+            <version>0.9.0</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba</groupId>
+            <artifactId>fastjson</artifactId>
+            <version>1.2.83</version> <!-- 版本可能不同 -->
+        </dependency>
+
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+            <version>3.5.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+        </dependency>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+        <!-- Hibernate Validator (Bean Validation 实现) -->
+        <dependency>
+            <groupId>org.hibernate.validator</groupId>
+            <artifactId>hibernate-validator</artifactId>
+            <version>6.2.0.Final</version>
+        </dependency>
+        <!-- 验证API -->
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+            <version>2.0.1.Final</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.aliyun.oss</groupId>
+            <artifactId>aliyun-sdk-oss</artifactId>
+            <version>3.15.1</version>
+        </dependency>
+
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+            <version>2.3.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.mysql</groupId>
+            <artifactId>mysql-connector-j</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-dependencies</artifactId>
+                <version>${spring-boot.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.8.1</version>
+                <configuration>
+                    <source>1.8</source>
+                    <target>1.8</target>
+                    <encoding>UTF-8</encoding>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <version>${spring-boot.version}</version>
+                <configuration>
+                    <mainClass>com.dt.MarketplaceApplication</mainClass>
+                    <skip>true</skip>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>repackage</id>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 15 - 0
src/main/java/com/dt/MarketplaceApplication.java

@@ -0,0 +1,15 @@
+package com.dt;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+@MapperScan("com.dt.*.mapper")
+public class MarketplaceApplication {
+
+    public static void main(String[] args) {
+        SpringApplication.run(MarketplaceApplication.class, args);
+    }
+
+}

+ 42 - 0
src/main/java/com/dt/child/controller/ChildController.java

@@ -0,0 +1,42 @@
+package com.dt.child.controller;
+
+import com.dt.common.domain.Child;
+import com.dt.common.service.ChildService;
+import com.dt.config.NonLoginRequired;
+import com.dt.util.TokenUtils;
+import com.dt.vo.Result;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestHeader;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import javax.validation.Valid;
+
+@RestController
+@RequestMapping("child")
+public class ChildController {
+
+    @Resource
+    private ChildService childService;
+
+//    添加幼儿
+    @RequestMapping("addChild")
+    @NonLoginRequired
+    public Result addChild(@RequestBody @Valid Child child, @RequestHeader("token") String token) {
+        Long userId = TokenUtils.getUserId(token);
+        child.setUserId(userId);
+        return childService.addChild(child);
+    }
+//    查询幼儿
+    @RequestMapping("selChild")
+    public Result selChild(@RequestHeader("token") String token) {
+        Long userId = TokenUtils.getUserId(token);
+        return childService.selChild(userId);
+    }
+
+
+
+
+
+}

+ 37 - 0
src/main/java/com/dt/child/controller/VideoController.java

@@ -0,0 +1,37 @@
+package com.dt.child.controller;
+
+import com.dt.common.service.VideoService;
+import com.dt.config.NonLoginRequired;
+import com.dt.dto.AddVideoDto;
+import com.dt.vo.Result;
+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 javax.annotation.Resource;
+import javax.validation.Valid;
+
+@RequestMapping("video")
+@RestController
+public class VideoController {
+
+    @Resource
+    private VideoService videoService;
+
+//  添加视频
+    @PostMapping("addVideo")
+    public Result addVideo(@RequestBody @Valid AddVideoDto addVideoDto){
+        return videoService.addVideo(addVideoDto);
+    }
+//    查询所有视频
+    @PostMapping("selVideo")
+    public Result selVideo(){
+        return videoService.selVideo();
+    }
+//
+
+
+
+
+}

+ 120 - 0
src/main/java/com/dt/common/domain/AbnormalRecord.java

@@ -0,0 +1,120 @@
+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 abnormal_record
+ */
+@TableName(value ="abnormal_record")
+@Data
+public class AbnormalRecord {
+    /**
+     * 记录ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 儿童ID
+     */
+    private Long childId;
+
+    /**
+     * 记录时间
+     */
+    private Date recordTime;
+
+    /**
+     * 异常类型
+     */
+    private String abnormalType;
+
+    /**
+     * 异常描述
+     */
+    private String description;
+
+    /**
+     * 处理方式
+     */
+    private String treatment;
+
+    /**
+     * 是否严重(0:否,1:是)
+     */
+    private Integer isSerious;
+
+    /**
+     * 记录人ID
+     */
+    private Long recorderId;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        AbnormalRecord other = (AbnormalRecord) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getChildId() == null ? other.getChildId() == null : this.getChildId().equals(other.getChildId()))
+            && (this.getRecordTime() == null ? other.getRecordTime() == null : this.getRecordTime().equals(other.getRecordTime()))
+            && (this.getAbnormalType() == null ? other.getAbnormalType() == null : this.getAbnormalType().equals(other.getAbnormalType()))
+            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
+            && (this.getTreatment() == null ? other.getTreatment() == null : this.getTreatment().equals(other.getTreatment()))
+            && (this.getIsSerious() == null ? other.getIsSerious() == null : this.getIsSerious().equals(other.getIsSerious()))
+            && (this.getRecorderId() == null ? other.getRecorderId() == null : this.getRecorderId().equals(other.getRecorderId()))
+            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getChildId() == null) ? 0 : getChildId().hashCode());
+        result = prime * result + ((getRecordTime() == null) ? 0 : getRecordTime().hashCode());
+        result = prime * result + ((getAbnormalType() == null) ? 0 : getAbnormalType().hashCode());
+        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
+        result = prime * result + ((getTreatment() == null) ? 0 : getTreatment().hashCode());
+        result = prime * result + ((getIsSerious() == null) ? 0 : getIsSerious().hashCode());
+        result = prime * result + ((getRecorderId() == null) ? 0 : getRecorderId().hashCode());
+        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().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(", childId=").append(childId);
+        sb.append(", recordTime=").append(recordTime);
+        sb.append(", abnormalType=").append(abnormalType);
+        sb.append(", description=").append(description);
+        sb.append(", treatment=").append(treatment);
+        sb.append(", isSerious=").append(isSerious);
+        sb.append(", recorderId=").append(recorderId);
+        sb.append(", createTime=").append(createTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 80 - 0
src/main/java/com/dt/common/domain/CaregiverGroup.java

@@ -0,0 +1,80 @@
+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 caregiver_group
+ */
+@TableName(value ="caregiver_group")
+@Data
+public class CaregiverGroup {
+    /**
+     * ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 护理人员ID
+     */
+    private Long caregiverId;
+
+    /**
+     * 班级/分组ID
+     */
+    private Long groupId;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        CaregiverGroup other = (CaregiverGroup) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getCaregiverId() == null ? other.getCaregiverId() == null : this.getCaregiverId().equals(other.getCaregiverId()))
+            && (this.getGroupId() == null ? other.getGroupId() == null : this.getGroupId().equals(other.getGroupId()))
+            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getCaregiverId() == null) ? 0 : getCaregiverId().hashCode());
+        result = prime * result + ((getGroupId() == null) ? 0 : getGroupId().hashCode());
+        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().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(", caregiverId=").append(caregiverId);
+        sb.append(", groupId=").append(groupId);
+        sb.append(", createTime=").append(createTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 149 - 0
src/main/java/com/dt/common/domain/Child.java

@@ -0,0 +1,149 @@
+package com.dt.common.domain;
+
+import com.alibaba.fastjson.annotation.JSONField;
+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;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.validation.constraints.Future;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+/**
+ * 儿童表
+ * @TableName child
+ */
+@TableName(value ="child")
+@Data
+public class Child {
+    /**
+     * 儿童ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 姓名
+     */
+    @NotBlank(message = "姓名不能为空")
+    private String name;
+
+    /**
+     * 性别(0:女,1:男)
+     */
+    @NotNull(message = "性别不能为空")
+    private Integer gender;
+
+    /**
+     * 出生日期
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    private Date birthday;
+
+    /**
+     * 头像URL
+     */
+    private String avatar;
+
+    /**
+     * 所属班级/分组ID
+     */
+    @NotNull(message = "所属班级不能为空")
+    private Long groupId;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 状态(0:停用,1:正常)
+     */
+    private Integer status;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * 用户id
+     */
+    @TableField(exist = false)
+    private Long userId;
+    /**
+     * 关系
+     */
+    @TableField(exist = false)
+    private String relation;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        Child other = (Child) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
+            && (this.getGender() == null ? other.getGender() == null : this.getGender().equals(other.getGender()))
+            && (this.getBirthday() == null ? other.getBirthday() == null : this.getBirthday().equals(other.getBirthday()))
+            && (this.getAvatar() == null ? other.getAvatar() == null : this.getAvatar().equals(other.getAvatar()))
+            && (this.getGroupId() == null ? other.getGroupId() == null : this.getGroupId().equals(other.getGroupId()))
+            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
+            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
+            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
+            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
+        result = prime * result + ((getGender() == null) ? 0 : getGender().hashCode());
+        result = prime * result + ((getBirthday() == null) ? 0 : getBirthday().hashCode());
+        result = prime * result + ((getAvatar() == null) ? 0 : getAvatar().hashCode());
+        result = prime * result + ((getGroupId() == null) ? 0 : getGroupId().hashCode());
+        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
+        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
+        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().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(", name=").append(name);
+        sb.append(", gender=").append(gender);
+        sb.append(", birthday=").append(birthday);
+        sb.append(", avatar=").append(avatar);
+        sb.append(", groupId=").append(groupId);
+        sb.append(", remark=").append(remark);
+        sb.append(", status=").append(status);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 96 - 0
src/main/java/com/dt/common/domain/ChildGroup.java

@@ -0,0 +1,96 @@
+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 child_group
+ */
+@TableName(value ="child_group")
+@Data
+public class ChildGroup {
+    /**
+     * 分组ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 分组名称
+     */
+    private String name;
+
+    /**
+     * 描述
+     */
+    private String description;
+
+    /**
+     * 年龄范围
+     */
+    private String ageRange;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        ChildGroup other = (ChildGroup) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
+            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
+            && (this.getAgeRange() == null ? other.getAgeRange() == null : this.getAgeRange().equals(other.getAgeRange()))
+            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
+            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
+        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
+        result = prime * result + ((getAgeRange() == null) ? 0 : getAgeRange().hashCode());
+        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().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(", name=").append(name);
+        sb.append(", description=").append(description);
+        sb.append(", ageRange=").append(ageRange);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 120 - 0
src/main/java/com/dt/common/domain/FoodRecord.java

@@ -0,0 +1,120 @@
+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 food_record
+ */
+@TableName(value ="food_record")
+@Data
+public class FoodRecord {
+    /**
+     * 记录ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 儿童ID
+     */
+    private Long childId;
+
+    /**
+     * 记录时间
+     */
+    private Date recordTime;
+
+    /**
+     * 餐次(0:早餐,1:上午加餐,2:午餐,3:下午加餐,4:晚餐)
+     */
+    private Integer mealType;
+
+    /**
+     * 食物内容
+     */
+    private String foodContent;
+
+    /**
+     * 食用量
+     */
+    private String amount;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 记录人ID
+     */
+    private Long recorderId;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        FoodRecord other = (FoodRecord) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getChildId() == null ? other.getChildId() == null : this.getChildId().equals(other.getChildId()))
+            && (this.getRecordTime() == null ? other.getRecordTime() == null : this.getRecordTime().equals(other.getRecordTime()))
+            && (this.getMealType() == null ? other.getMealType() == null : this.getMealType().equals(other.getMealType()))
+            && (this.getFoodContent() == null ? other.getFoodContent() == null : this.getFoodContent().equals(other.getFoodContent()))
+            && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
+            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
+            && (this.getRecorderId() == null ? other.getRecorderId() == null : this.getRecorderId().equals(other.getRecorderId()))
+            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getChildId() == null) ? 0 : getChildId().hashCode());
+        result = prime * result + ((getRecordTime() == null) ? 0 : getRecordTime().hashCode());
+        result = prime * result + ((getMealType() == null) ? 0 : getMealType().hashCode());
+        result = prime * result + ((getFoodContent() == null) ? 0 : getFoodContent().hashCode());
+        result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
+        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
+        result = prime * result + ((getRecorderId() == null) ? 0 : getRecorderId().hashCode());
+        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().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(", childId=").append(childId);
+        sb.append(", recordTime=").append(recordTime);
+        sb.append(", mealType=").append(mealType);
+        sb.append(", foodContent=").append(foodContent);
+        sb.append(", amount=").append(amount);
+        sb.append(", remark=").append(remark);
+        sb.append(", recorderId=").append(recorderId);
+        sb.append(", createTime=").append(createTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 121 - 0
src/main/java/com/dt/common/domain/GrowthRecord.java

@@ -0,0 +1,121 @@
+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.math.BigDecimal;
+import java.util.Date;
+import lombok.Data;
+
+/**
+ * 身高体重记录表
+ * @TableName growth_record
+ */
+@TableName(value ="growth_record")
+@Data
+public class GrowthRecord {
+    /**
+     * 记录ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 儿童ID
+     */
+    private Long childId;
+
+    /**
+     * 记录时间
+     */
+    private Date recordTime;
+
+    /**
+     * 身高(cm)
+     */
+    private BigDecimal height;
+
+    /**
+     * 体重(kg)
+     */
+    private BigDecimal weight;
+
+    /**
+     * 头围(cm)
+     */
+    private BigDecimal headCircumference;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 记录人ID
+     */
+    private Long recorderId;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        GrowthRecord other = (GrowthRecord) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getChildId() == null ? other.getChildId() == null : this.getChildId().equals(other.getChildId()))
+            && (this.getRecordTime() == null ? other.getRecordTime() == null : this.getRecordTime().equals(other.getRecordTime()))
+            && (this.getHeight() == null ? other.getHeight() == null : this.getHeight().equals(other.getHeight()))
+            && (this.getWeight() == null ? other.getWeight() == null : this.getWeight().equals(other.getWeight()))
+            && (this.getHeadCircumference() == null ? other.getHeadCircumference() == null : this.getHeadCircumference().equals(other.getHeadCircumference()))
+            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
+            && (this.getRecorderId() == null ? other.getRecorderId() == null : this.getRecorderId().equals(other.getRecorderId()))
+            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getChildId() == null) ? 0 : getChildId().hashCode());
+        result = prime * result + ((getRecordTime() == null) ? 0 : getRecordTime().hashCode());
+        result = prime * result + ((getHeight() == null) ? 0 : getHeight().hashCode());
+        result = prime * result + ((getWeight() == null) ? 0 : getWeight().hashCode());
+        result = prime * result + ((getHeadCircumference() == null) ? 0 : getHeadCircumference().hashCode());
+        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
+        result = prime * result + ((getRecorderId() == null) ? 0 : getRecorderId().hashCode());
+        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().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(", childId=").append(childId);
+        sb.append(", recordTime=").append(recordTime);
+        sb.append(", height=").append(height);
+        sb.append(", weight=").append(weight);
+        sb.append(", headCircumference=").append(headCircumference);
+        sb.append(", remark=").append(remark);
+        sb.append(", recorderId=").append(recorderId);
+        sb.append(", createTime=").append(createTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 112 - 0
src/main/java/com/dt/common/domain/Message.java

@@ -0,0 +1,112 @@
+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 message
+ */
+@TableName(value ="message")
+@Data
+public class Message {
+    /**
+     * 消息ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 发送者ID
+     */
+    private Long senderId;
+
+    /**
+     * 接收者ID
+     */
+    private Long receiverId;
+
+    /**
+     * 消息内容
+     */
+    private String content;
+
+    /**
+     * 消息类型(0:文本,1:图片)
+     */
+    private Integer messageType;
+
+    /**
+     * 是否已读(0:未读,1:已读)
+     */
+    private Integer isRead;
+
+    /**
+     * 阅读时间
+     */
+    private Date readTime;
+
+    /**
+     * 发送时间
+     */
+    private Date sendTime;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        Message other = (Message) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getSenderId() == null ? other.getSenderId() == null : this.getSenderId().equals(other.getSenderId()))
+            && (this.getReceiverId() == null ? other.getReceiverId() == null : this.getReceiverId().equals(other.getReceiverId()))
+            && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
+            && (this.getMessageType() == null ? other.getMessageType() == null : this.getMessageType().equals(other.getMessageType()))
+            && (this.getIsRead() == null ? other.getIsRead() == null : this.getIsRead().equals(other.getIsRead()))
+            && (this.getReadTime() == null ? other.getReadTime() == null : this.getReadTime().equals(other.getReadTime()))
+            && (this.getSendTime() == null ? other.getSendTime() == null : this.getSendTime().equals(other.getSendTime()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getSenderId() == null) ? 0 : getSenderId().hashCode());
+        result = prime * result + ((getReceiverId() == null) ? 0 : getReceiverId().hashCode());
+        result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
+        result = prime * result + ((getMessageType() == null) ? 0 : getMessageType().hashCode());
+        result = prime * result + ((getIsRead() == null) ? 0 : getIsRead().hashCode());
+        result = prime * result + ((getReadTime() == null) ? 0 : getReadTime().hashCode());
+        result = prime * result + ((getSendTime() == null) ? 0 : getSendTime().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(", senderId=").append(senderId);
+        sb.append(", receiverId=").append(receiverId);
+        sb.append(", content=").append(content);
+        sb.append(", messageType=").append(messageType);
+        sb.append(", isRead=").append(isRead);
+        sb.append(", readTime=").append(readTime);
+        sb.append(", sendTime=").append(sendTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 112 - 0
src/main/java/com/dt/common/domain/MilestoneRecord.java

@@ -0,0 +1,112 @@
+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 milestone_record
+ */
+@TableName(value ="milestone_record")
+@Data
+public class MilestoneRecord {
+    /**
+     * 记录ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 儿童ID
+     */
+    private Long childId;
+
+    /**
+     * 里程碑类型
+     */
+    private String milestoneType;
+
+    /**
+     * 里程碑名称
+     */
+    private String milestoneName;
+
+    /**
+     * 达成时间
+     */
+    private Date achieveTime;
+
+    /**
+     * 描述
+     */
+    private String description;
+
+    /**
+     * 记录人ID
+     */
+    private Long recorderId;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        MilestoneRecord other = (MilestoneRecord) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getChildId() == null ? other.getChildId() == null : this.getChildId().equals(other.getChildId()))
+            && (this.getMilestoneType() == null ? other.getMilestoneType() == null : this.getMilestoneType().equals(other.getMilestoneType()))
+            && (this.getMilestoneName() == null ? other.getMilestoneName() == null : this.getMilestoneName().equals(other.getMilestoneName()))
+            && (this.getAchieveTime() == null ? other.getAchieveTime() == null : this.getAchieveTime().equals(other.getAchieveTime()))
+            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
+            && (this.getRecorderId() == null ? other.getRecorderId() == null : this.getRecorderId().equals(other.getRecorderId()))
+            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getChildId() == null) ? 0 : getChildId().hashCode());
+        result = prime * result + ((getMilestoneType() == null) ? 0 : getMilestoneType().hashCode());
+        result = prime * result + ((getMilestoneName() == null) ? 0 : getMilestoneName().hashCode());
+        result = prime * result + ((getAchieveTime() == null) ? 0 : getAchieveTime().hashCode());
+        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
+        result = prime * result + ((getRecorderId() == null) ? 0 : getRecorderId().hashCode());
+        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().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(", childId=").append(childId);
+        sb.append(", milestoneType=").append(milestoneType);
+        sb.append(", milestoneName=").append(milestoneName);
+        sb.append(", achieveTime=").append(achieveTime);
+        sb.append(", description=").append(description);
+        sb.append(", recorderId=").append(recorderId);
+        sb.append(", createTime=").append(createTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 136 - 0
src/main/java/com/dt/common/domain/Notice.java

@@ -0,0 +1,136 @@
+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 notice
+ */
+@TableName(value ="notice")
+@Data
+public class Notice {
+    /**
+     * 通知ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 标题
+     */
+    private String title;
+
+    /**
+     * 内容
+     */
+    private String content;
+
+    /**
+     * 通知类型(0:公告,1:班级通知)
+     */
+    private Integer noticeType;
+
+    /**
+     * 班级ID(为空表示全体通知)
+     */
+    private Long groupId;
+
+    /**
+     * 发布人ID
+     */
+    private Long publisherId;
+
+    /**
+     * 发布时间
+     */
+    private Date publishTime;
+
+    /**
+     * 是否置顶(0:否,1:是)
+     */
+    private Integer isTop;
+
+    /**
+     * 状态(0:下架,1:发布)
+     */
+    private Integer status;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        Notice other = (Notice) 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.getNoticeType() == null ? other.getNoticeType() == null : this.getNoticeType().equals(other.getNoticeType()))
+            && (this.getGroupId() == null ? other.getGroupId() == null : this.getGroupId().equals(other.getGroupId()))
+            && (this.getPublisherId() == null ? other.getPublisherId() == null : this.getPublisherId().equals(other.getPublisherId()))
+            && (this.getPublishTime() == null ? other.getPublishTime() == null : this.getPublishTime().equals(other.getPublishTime()))
+            && (this.getIsTop() == null ? other.getIsTop() == null : this.getIsTop().equals(other.getIsTop()))
+            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
+            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
+            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
+    }
+
+    @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 + ((getNoticeType() == null) ? 0 : getNoticeType().hashCode());
+        result = prime * result + ((getGroupId() == null) ? 0 : getGroupId().hashCode());
+        result = prime * result + ((getPublisherId() == null) ? 0 : getPublisherId().hashCode());
+        result = prime * result + ((getPublishTime() == null) ? 0 : getPublishTime().hashCode());
+        result = prime * result + ((getIsTop() == null) ? 0 : getIsTop().hashCode());
+        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
+        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
+        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().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(", noticeType=").append(noticeType);
+        sb.append(", groupId=").append(groupId);
+        sb.append(", publisherId=").append(publisherId);
+        sb.append(", publishTime=").append(publishTime);
+        sb.append(", isTop=").append(isTop);
+        sb.append(", status=").append(status);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 80 - 0
src/main/java/com/dt/common/domain/NoticeRead.java

@@ -0,0 +1,80 @@
+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 notice_read
+ */
+@TableName(value ="notice_read")
+@Data
+public class NoticeRead {
+    /**
+     * ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 通知ID
+     */
+    private Long noticeId;
+
+    /**
+     * 用户ID
+     */
+    private Long userId;
+
+    /**
+     * 阅读时间
+     */
+    private Date readTime;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        NoticeRead other = (NoticeRead) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getNoticeId() == null ? other.getNoticeId() == null : this.getNoticeId().equals(other.getNoticeId()))
+            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
+            && (this.getReadTime() == null ? other.getReadTime() == null : this.getReadTime().equals(other.getReadTime()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getNoticeId() == null) ? 0 : getNoticeId().hashCode());
+        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
+        result = prime * result + ((getReadTime() == null) ? 0 : getReadTime().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(", noticeId=").append(noticeId);
+        sb.append(", userId=").append(userId);
+        sb.append(", readTime=").append(readTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 112 - 0
src/main/java/com/dt/common/domain/OperationLog.java

@@ -0,0 +1,112 @@
+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 operation_log
+ */
+@TableName(value ="operation_log")
+@Data
+public class OperationLog {
+    /**
+     * 日志ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 操作人ID
+     */
+    private Long userId;
+
+    /**
+     * 操作类型
+     */
+    private String operation;
+
+    /**
+     * 请求方法
+     */
+    private String method;
+
+    /**
+     * 请求参数
+     */
+    private String params;
+
+    /**
+     * IP地址
+     */
+    private String ip;
+
+    /**
+     * 操作时间
+     */
+    private Date operationTime;
+
+    /**
+     * 操作结果(0:失败,1:成功)
+     */
+    private Integer operationResult;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        OperationLog other = (OperationLog) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
+            && (this.getOperation() == null ? other.getOperation() == null : this.getOperation().equals(other.getOperation()))
+            && (this.getMethod() == null ? other.getMethod() == null : this.getMethod().equals(other.getMethod()))
+            && (this.getParams() == null ? other.getParams() == null : this.getParams().equals(other.getParams()))
+            && (this.getIp() == null ? other.getIp() == null : this.getIp().equals(other.getIp()))
+            && (this.getOperationTime() == null ? other.getOperationTime() == null : this.getOperationTime().equals(other.getOperationTime()))
+            && (this.getOperationResult() == null ? other.getOperationResult() == null : this.getOperationResult().equals(other.getOperationResult()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
+        result = prime * result + ((getOperation() == null) ? 0 : getOperation().hashCode());
+        result = prime * result + ((getMethod() == null) ? 0 : getMethod().hashCode());
+        result = prime * result + ((getParams() == null) ? 0 : getParams().hashCode());
+        result = prime * result + ((getIp() == null) ? 0 : getIp().hashCode());
+        result = prime * result + ((getOperationTime() == null) ? 0 : getOperationTime().hashCode());
+        result = prime * result + ((getOperationResult() == null) ? 0 : getOperationResult().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(", userId=").append(userId);
+        sb.append(", operation=").append(operation);
+        sb.append(", method=").append(method);
+        sb.append(", params=").append(params);
+        sb.append(", ip=").append(ip);
+        sb.append(", operationTime=").append(operationTime);
+        sb.append(", operationResult=").append(operationResult);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 96 - 0
src/main/java/com/dt/common/domain/ParentChild.java

@@ -0,0 +1,96 @@
+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 parent_child
+ */
+@TableName(value ="parent_child")
+@Data
+public class ParentChild {
+    /**
+     * 关系ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 家长用户ID
+     */
+    private Long parentId;
+
+    /**
+     * 儿童ID
+     */
+    private Long childId;
+
+    /**
+     * 关系(父亲/母亲/祖父/祖母等)
+     */
+    private String relation;
+
+    /**
+     * 是否主监护人(0:否,1:是)
+     */
+    private Integer isPrimary;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        ParentChild other = (ParentChild) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
+            && (this.getChildId() == null ? other.getChildId() == null : this.getChildId().equals(other.getChildId()))
+            && (this.getRelation() == null ? other.getRelation() == null : this.getRelation().equals(other.getRelation()))
+            && (this.getIsPrimary() == null ? other.getIsPrimary() == null : this.getIsPrimary().equals(other.getIsPrimary()))
+            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode());
+        result = prime * result + ((getChildId() == null) ? 0 : getChildId().hashCode());
+        result = prime * result + ((getRelation() == null) ? 0 : getRelation().hashCode());
+        result = prime * result + ((getIsPrimary() == null) ? 0 : getIsPrimary().hashCode());
+        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().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(", parentId=").append(parentId);
+        sb.append(", childId=").append(childId);
+        sb.append(", relation=").append(relation);
+        sb.append(", isPrimary=").append(isPrimary);
+        sb.append(", createTime=").append(createTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 112 - 0
src/main/java/com/dt/common/domain/SleepRecord.java

@@ -0,0 +1,112 @@
+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 sleep_record
+ */
+@TableName(value ="sleep_record")
+@Data
+public class SleepRecord {
+    /**
+     * 记录ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 儿童ID
+     */
+    private Long childId;
+
+    /**
+     * 入睡时间
+     */
+    private Date sleepTime;
+
+    /**
+     * 醒来时间
+     */
+    private Date wakeTime;
+
+    /**
+     * 睡眠质量(0:差,1:一般,2:良好)
+     */
+    private Integer sleepQuality;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 记录人ID
+     */
+    private Long recorderId;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        SleepRecord other = (SleepRecord) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getChildId() == null ? other.getChildId() == null : this.getChildId().equals(other.getChildId()))
+            && (this.getSleepTime() == null ? other.getSleepTime() == null : this.getSleepTime().equals(other.getSleepTime()))
+            && (this.getWakeTime() == null ? other.getWakeTime() == null : this.getWakeTime().equals(other.getWakeTime()))
+            && (this.getSleepQuality() == null ? other.getSleepQuality() == null : this.getSleepQuality().equals(other.getSleepQuality()))
+            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
+            && (this.getRecorderId() == null ? other.getRecorderId() == null : this.getRecorderId().equals(other.getRecorderId()))
+            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getChildId() == null) ? 0 : getChildId().hashCode());
+        result = prime * result + ((getSleepTime() == null) ? 0 : getSleepTime().hashCode());
+        result = prime * result + ((getWakeTime() == null) ? 0 : getWakeTime().hashCode());
+        result = prime * result + ((getSleepQuality() == null) ? 0 : getSleepQuality().hashCode());
+        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
+        result = prime * result + ((getRecorderId() == null) ? 0 : getRecorderId().hashCode());
+        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().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(", childId=").append(childId);
+        sb.append(", sleepTime=").append(sleepTime);
+        sb.append(", wakeTime=").append(wakeTime);
+        sb.append(", sleepQuality=").append(sleepQuality);
+        sb.append(", remark=").append(remark);
+        sb.append(", recorderId=").append(recorderId);
+        sb.append(", createTime=").append(createTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 88 - 0
src/main/java/com/dt/common/domain/SystemConfig.java

@@ -0,0 +1,88 @@
+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 system_config
+ */
+@TableName(value ="system_config")
+@Data
+public class SystemConfig {
+    /**
+     * 配置ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 配置键
+     */
+    private String configKey;
+
+    /**
+     * 配置值
+     */
+    private String configValue;
+
+    /**
+     * 描述
+     */
+    private String description;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        SystemConfig other = (SystemConfig) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getConfigKey() == null ? other.getConfigKey() == null : this.getConfigKey().equals(other.getConfigKey()))
+            && (this.getConfigValue() == null ? other.getConfigValue() == null : this.getConfigValue().equals(other.getConfigValue()))
+            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
+            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getConfigKey() == null) ? 0 : getConfigKey().hashCode());
+        result = prime * result + ((getConfigValue() == null) ? 0 : getConfigValue().hashCode());
+        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
+        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().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(", configKey=").append(configKey);
+        sb.append(", configValue=").append(configValue);
+        sb.append(", description=").append(description);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 113 - 0
src/main/java/com/dt/common/domain/TemperatureRecord.java

@@ -0,0 +1,113 @@
+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.math.BigDecimal;
+import java.util.Date;
+import lombok.Data;
+
+/**
+ * 体温记录表
+ * @TableName temperature_record
+ */
+@TableName(value ="temperature_record")
+@Data
+public class TemperatureRecord {
+    /**
+     * 记录ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 儿童ID
+     */
+    private Long childId;
+
+    /**
+     * 记录时间
+     */
+    private Date recordTime;
+
+    /**
+     * 体温值(摄氏度)
+     */
+    private BigDecimal temperature;
+
+    /**
+     * 是否异常(0:正常,1:异常)
+     */
+    private Integer isAbnormal;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 记录人ID
+     */
+    private Long recorderId;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        TemperatureRecord other = (TemperatureRecord) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getChildId() == null ? other.getChildId() == null : this.getChildId().equals(other.getChildId()))
+            && (this.getRecordTime() == null ? other.getRecordTime() == null : this.getRecordTime().equals(other.getRecordTime()))
+            && (this.getTemperature() == null ? other.getTemperature() == null : this.getTemperature().equals(other.getTemperature()))
+            && (this.getIsAbnormal() == null ? other.getIsAbnormal() == null : this.getIsAbnormal().equals(other.getIsAbnormal()))
+            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
+            && (this.getRecorderId() == null ? other.getRecorderId() == null : this.getRecorderId().equals(other.getRecorderId()))
+            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getChildId() == null) ? 0 : getChildId().hashCode());
+        result = prime * result + ((getRecordTime() == null) ? 0 : getRecordTime().hashCode());
+        result = prime * result + ((getTemperature() == null) ? 0 : getTemperature().hashCode());
+        result = prime * result + ((getIsAbnormal() == null) ? 0 : getIsAbnormal().hashCode());
+        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
+        result = prime * result + ((getRecorderId() == null) ? 0 : getRecorderId().hashCode());
+        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().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(", childId=").append(childId);
+        sb.append(", recordTime=").append(recordTime);
+        sb.append(", temperature=").append(temperature);
+        sb.append(", isAbnormal=").append(isAbnormal);
+        sb.append(", remark=").append(remark);
+        sb.append(", recorderId=").append(recorderId);
+        sb.append(", createTime=").append(createTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 112 - 0
src/main/java/com/dt/common/domain/ToiletRecord.java

@@ -0,0 +1,112 @@
+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 toilet_record
+ */
+@TableName(value ="toilet_record")
+@Data
+public class ToiletRecord {
+    /**
+     * 记录ID
+     */
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 儿童ID
+     */
+    private Long childId;
+
+    /**
+     * 记录时间
+     */
+    private Date recordTime;
+
+    /**
+     * 如厕类型(0:大便,1:小便)
+     */
+    private Integer toiletType;
+
+    /**
+     * 状态描述
+     */
+    private String status;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 记录人ID
+     */
+    private Long recorderId;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    @Override
+    public boolean equals(Object that) {
+        if (this == that) {
+            return true;
+        }
+        if (that == null) {
+            return false;
+        }
+        if (getClass() != that.getClass()) {
+            return false;
+        }
+        ToiletRecord other = (ToiletRecord) that;
+        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
+            && (this.getChildId() == null ? other.getChildId() == null : this.getChildId().equals(other.getChildId()))
+            && (this.getRecordTime() == null ? other.getRecordTime() == null : this.getRecordTime().equals(other.getRecordTime()))
+            && (this.getToiletType() == null ? other.getToiletType() == null : this.getToiletType().equals(other.getToiletType()))
+            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
+            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
+            && (this.getRecorderId() == null ? other.getRecorderId() == null : this.getRecorderId().equals(other.getRecorderId()))
+            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()));
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
+        result = prime * result + ((getChildId() == null) ? 0 : getChildId().hashCode());
+        result = prime * result + ((getRecordTime() == null) ? 0 : getRecordTime().hashCode());
+        result = prime * result + ((getToiletType() == null) ? 0 : getToiletType().hashCode());
+        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
+        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
+        result = prime * result + ((getRecorderId() == null) ? 0 : getRecorderId().hashCode());
+        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().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(", childId=").append(childId);
+        sb.append(", recordTime=").append(recordTime);
+        sb.append(", toiletType=").append(toiletType);
+        sb.append(", status=").append(status);
+        sb.append(", remark=").append(remark);
+        sb.append(", recorderId=").append(recorderId);
+        sb.append(", createTime=").append(createTime);
+        sb.append("]");
+        return sb.toString();
+    }
+}

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

@@ -0,0 +1,192 @@
+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;
+
+    @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()));
+    }
+
+    @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());
+        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("]");
+        return sb.toString();
+    }
+}

+ 124 - 0
src/main/java/com/dt/common/domain/Video.java

@@ -0,0 +1,124 @@
+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.io.Serializable;
+import lombok.Data;
+
+/**
+ * 视频表
+ * @TableName video
+ */
+@TableName(value ="video")
+@Data
+public class Video implements Serializable {
+    /**
+     * id
+     */
+    @TableId
+    private Long id;
+
+    /**
+     * 标签
+     */
+    private String title;
+
+    /**
+     * 图片
+     */
+    private String img;
+
+    /**
+     * 路径
+     */
+    private String url;
+
+    /**
+     * 观看数量
+     */
+    private Integer viewCount;
+
+    /**
+     * 点赞数量
+     */
+    private Integer likeCount;
+
+    /**
+     * 品论数量
+     */
+    private Integer commentCount;
+
+    /**
+     * 收藏数量
+     */
+    private Integer favoritesCount;
+
+    /**
+     * 是否精选视频
+     */
+    private Integer isFeatured;
+
+    @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;
+        }
+        Video other = (Video) 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.getImg() == null ? other.getImg() == null : this.getImg().equals(other.getImg()))
+            && (this.getUrl() == null ? other.getUrl() == null : this.getUrl().equals(other.getUrl()))
+            && (this.getViewCount() == null ? other.getViewCount() == null : this.getViewCount().equals(other.getViewCount()))
+            && (this.getLikeCount() == null ? other.getLikeCount() == null : this.getLikeCount().equals(other.getLikeCount()))
+            && (this.getCommentCount() == null ? other.getCommentCount() == null : this.getCommentCount().equals(other.getCommentCount()))
+            && (this.getFavoritesCount() == null ? other.getFavoritesCount() == null : this.getFavoritesCount().equals(other.getFavoritesCount()))
+            && (this.getIsFeatured() == null ? other.getIsFeatured() == null : this.getIsFeatured().equals(other.getIsFeatured()));
+    }
+
+    @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 + ((getImg() == null) ? 0 : getImg().hashCode());
+        result = prime * result + ((getUrl() == null) ? 0 : getUrl().hashCode());
+        result = prime * result + ((getViewCount() == null) ? 0 : getViewCount().hashCode());
+        result = prime * result + ((getLikeCount() == null) ? 0 : getLikeCount().hashCode());
+        result = prime * result + ((getCommentCount() == null) ? 0 : getCommentCount().hashCode());
+        result = prime * result + ((getFavoritesCount() == null) ? 0 : getFavoritesCount().hashCode());
+        result = prime * result + ((getIsFeatured() == null) ? 0 : getIsFeatured().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(", img=").append(img);
+        sb.append(", url=").append(url);
+        sb.append(", viewCount=").append(viewCount);
+        sb.append(", likeCount=").append(likeCount);
+        sb.append(", commentCount=").append(commentCount);
+        sb.append(", favoritesCount=").append(favoritesCount);
+        sb.append(", isFeatured=").append(isFeatured);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

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

@@ -0,0 +1,18 @@
+package com.dt.common.mapper;
+
+import com.dt.common.domain.AbnormalRecord;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author sunday
+* @description 针对表【abnormal_record(异常情况记录表)】的数据库操作Mapper
+* @createDate 2025-07-01 16:33:35
+* @Entity com.dt.common.domain.AbnormalRecord
+*/
+public interface AbnormalRecordMapper extends BaseMapper<AbnormalRecord> {
+
+}
+
+
+
+

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

@@ -0,0 +1,18 @@
+package com.dt.common.mapper;
+
+import com.dt.common.domain.CaregiverGroup;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author sunday
+* @description 针对表【caregiver_group(护理人员与班级关联表)】的数据库操作Mapper
+* @createDate 2025-07-01 16:33:35
+* @Entity com.dt.common.domain.CaregiverGroup
+*/
+public interface CaregiverGroupMapper extends BaseMapper<CaregiverGroup> {
+
+}
+
+
+
+

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

@@ -0,0 +1,18 @@
+package com.dt.common.mapper;
+
+import com.dt.common.domain.ChildGroup;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author sunday
+* @description 针对表【child_group(班级/分组表)】的数据库操作Mapper
+* @createDate 2025-07-01 16:33:35
+* @Entity com.dt.common.domain.ChildGroup
+*/
+public interface ChildGroupMapper extends BaseMapper<ChildGroup> {
+
+}
+
+
+
+

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

@@ -0,0 +1,18 @@
+package com.dt.common.mapper;
+
+import com.dt.common.domain.Child;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author sunday
+* @description 针对表【child(儿童表)】的数据库操作Mapper
+* @createDate 2025-07-01 16:33:35
+* @Entity com.dt.common.domain.Child
+*/
+public interface ChildMapper extends BaseMapper<Child> {
+
+}
+
+
+
+

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

@@ -0,0 +1,18 @@
+package com.dt.common.mapper;
+
+import com.dt.common.domain.FoodRecord;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author sunday
+* @description 针对表【food_record(饮食记录表)】的数据库操作Mapper
+* @createDate 2025-07-01 16:33:35
+* @Entity com.dt.common.domain.FoodRecord
+*/
+public interface FoodRecordMapper extends BaseMapper<FoodRecord> {
+
+}
+
+
+
+

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

@@ -0,0 +1,18 @@
+package com.dt.common.mapper;
+
+import com.dt.common.domain.GrowthRecord;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author sunday
+* @description 针对表【growth_record(身高体重记录表)】的数据库操作Mapper
+* @createDate 2025-07-01 16:33:35
+* @Entity com.dt.common.domain.GrowthRecord
+*/
+public interface GrowthRecordMapper extends BaseMapper<GrowthRecord> {
+
+}
+
+
+
+

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

@@ -0,0 +1,18 @@
+package com.dt.common.mapper;
+
+import com.dt.common.domain.Message;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author sunday
+* @description 针对表【message(消息表)】的数据库操作Mapper
+* @createDate 2025-07-01 16:33:35
+* @Entity com.dt.common.domain.Message
+*/
+public interface MessageMapper extends BaseMapper<Message> {
+
+}
+
+
+
+

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

@@ -0,0 +1,18 @@
+package com.dt.common.mapper;
+
+import com.dt.common.domain.MilestoneRecord;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author sunday
+* @description 针对表【milestone_record(发育里程碑记录表)】的数据库操作Mapper
+* @createDate 2025-07-01 16:33:35
+* @Entity com.dt.common.domain.MilestoneRecord
+*/
+public interface MilestoneRecordMapper extends BaseMapper<MilestoneRecord> {
+
+}
+
+
+
+

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

@@ -0,0 +1,18 @@
+package com.dt.common.mapper;
+
+import com.dt.common.domain.Notice;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author sunday
+* @description 针对表【notice(通知公告表)】的数据库操作Mapper
+* @createDate 2025-07-01 16:33:35
+* @Entity com.dt.common.domain.Notice
+*/
+public interface NoticeMapper extends BaseMapper<Notice> {
+
+}
+
+
+
+

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

@@ -0,0 +1,18 @@
+package com.dt.common.mapper;
+
+import com.dt.common.domain.NoticeRead;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author sunday
+* @description 针对表【notice_read(通知阅读状态表)】的数据库操作Mapper
+* @createDate 2025-07-01 16:33:35
+* @Entity com.dt.common.domain.NoticeRead
+*/
+public interface NoticeReadMapper extends BaseMapper<NoticeRead> {
+
+}
+
+
+
+

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

@@ -0,0 +1,18 @@
+package com.dt.common.mapper;
+
+import com.dt.common.domain.OperationLog;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author sunday
+* @description 针对表【operation_log(操作日志表)】的数据库操作Mapper
+* @createDate 2025-07-01 16:33:35
+* @Entity com.dt.common.domain.OperationLog
+*/
+public interface OperationLogMapper extends BaseMapper<OperationLog> {
+
+}
+
+
+
+

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

@@ -0,0 +1,18 @@
+package com.dt.common.mapper;
+
+import com.dt.common.domain.ParentChild;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author sunday
+* @description 针对表【parent_child(家长儿童关系表)】的数据库操作Mapper
+* @createDate 2025-07-01 16:33:35
+* @Entity com.dt.common.domain.ParentChild
+*/
+public interface ParentChildMapper extends BaseMapper<ParentChild> {
+
+}
+
+
+
+

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

@@ -0,0 +1,18 @@
+package com.dt.common.mapper;
+
+import com.dt.common.domain.SleepRecord;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author sunday
+* @description 针对表【sleep_record(睡眠记录表)】的数据库操作Mapper
+* @createDate 2025-07-01 16:33:35
+* @Entity com.dt.common.domain.SleepRecord
+*/
+public interface SleepRecordMapper extends BaseMapper<SleepRecord> {
+
+}
+
+
+
+

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

@@ -0,0 +1,18 @@
+package com.dt.common.mapper;
+
+import com.dt.common.domain.SystemConfig;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author sunday
+* @description 针对表【system_config(系统配置表)】的数据库操作Mapper
+* @createDate 2025-07-01 16:33:35
+* @Entity com.dt.common.domain.SystemConfig
+*/
+public interface SystemConfigMapper extends BaseMapper<SystemConfig> {
+
+}
+
+
+
+

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

@@ -0,0 +1,18 @@
+package com.dt.common.mapper;
+
+import com.dt.common.domain.TemperatureRecord;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author sunday
+* @description 针对表【temperature_record(体温记录表)】的数据库操作Mapper
+* @createDate 2025-07-01 16:33:35
+* @Entity com.dt.common.domain.TemperatureRecord
+*/
+public interface TemperatureRecordMapper extends BaseMapper<TemperatureRecord> {
+
+}
+
+
+
+

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

@@ -0,0 +1,18 @@
+package com.dt.common.mapper;
+
+import com.dt.common.domain.ToiletRecord;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author sunday
+* @description 针对表【toilet_record(如厕记录表)】的数据库操作Mapper
+* @createDate 2025-07-01 16:33:35
+* @Entity com.dt.common.domain.ToiletRecord
+*/
+public interface ToiletRecordMapper extends BaseMapper<ToiletRecord> {
+
+}
+
+
+
+

+ 18 - 0
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-01 16:33:35
+* @Entity com.dt.common.domain.User
+*/
+public interface UserMapper extends BaseMapper<User> {
+
+}
+
+
+
+

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

@@ -0,0 +1,18 @@
+package com.dt.common.mapper;
+
+import com.dt.common.domain.Video;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author lzy
+* @description 针对表【video(视频表)】的数据库操作Mapper
+* @createDate 2025-07-03 08:31:55
+* @Entity com.dt.common.domain.Video
+*/
+public interface VideoMapper extends BaseMapper<Video> {
+
+}
+
+
+
+

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

@@ -0,0 +1,13 @@
+package com.dt.common.service;
+
+import com.dt.common.domain.AbnormalRecord;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author sunday
+* @description 针对表【abnormal_record(异常情况记录表)】的数据库操作Service
+* @createDate 2025-07-01 16:33:35
+*/
+public interface AbnormalRecordService extends IService<AbnormalRecord> {
+
+}

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

@@ -0,0 +1,13 @@
+package com.dt.common.service;
+
+import com.dt.common.domain.CaregiverGroup;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author sunday
+* @description 针对表【caregiver_group(护理人员与班级关联表)】的数据库操作Service
+* @createDate 2025-07-01 16:33:35
+*/
+public interface CaregiverGroupService extends IService<CaregiverGroup> {
+
+}

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

@@ -0,0 +1,13 @@
+package com.dt.common.service;
+
+import com.dt.common.domain.ChildGroup;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author sunday
+* @description 针对表【child_group(班级/分组表)】的数据库操作Service
+* @createDate 2025-07-01 16:33:35
+*/
+public interface ChildGroupService extends IService<ChildGroup> {
+
+}

+ 18 - 0
src/main/java/com/dt/common/service/ChildService.java

@@ -0,0 +1,18 @@
+package com.dt.common.service;
+
+import com.dt.common.domain.Child;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.dt.vo.Result;
+
+/**
+* @author sunday
+* @description 针对表【child(儿童表)】的数据库操作Service
+* @createDate 2025-07-01 16:33:35
+*/
+public interface ChildService extends IService<Child> {
+
+//    添加幼儿
+    Result addChild(Child child);
+//  查询幼儿
+    Result selChild(Long userId);
+}

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

@@ -0,0 +1,13 @@
+package com.dt.common.service;
+
+import com.dt.common.domain.FoodRecord;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author sunday
+* @description 针对表【food_record(饮食记录表)】的数据库操作Service
+* @createDate 2025-07-01 16:33:35
+*/
+public interface FoodRecordService extends IService<FoodRecord> {
+
+}

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

@@ -0,0 +1,13 @@
+package com.dt.common.service;
+
+import com.dt.common.domain.GrowthRecord;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author sunday
+* @description 针对表【growth_record(身高体重记录表)】的数据库操作Service
+* @createDate 2025-07-01 16:33:35
+*/
+public interface GrowthRecordService extends IService<GrowthRecord> {
+
+}

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

@@ -0,0 +1,13 @@
+package com.dt.common.service;
+
+import com.dt.common.domain.Message;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author sunday
+* @description 针对表【message(消息表)】的数据库操作Service
+* @createDate 2025-07-01 16:33:35
+*/
+public interface MessageService extends IService<Message> {
+
+}

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

@@ -0,0 +1,13 @@
+package com.dt.common.service;
+
+import com.dt.common.domain.MilestoneRecord;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author sunday
+* @description 针对表【milestone_record(发育里程碑记录表)】的数据库操作Service
+* @createDate 2025-07-01 16:33:35
+*/
+public interface MilestoneRecordService extends IService<MilestoneRecord> {
+
+}

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

@@ -0,0 +1,13 @@
+package com.dt.common.service;
+
+import com.dt.common.domain.NoticeRead;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author sunday
+* @description 针对表【notice_read(通知阅读状态表)】的数据库操作Service
+* @createDate 2025-07-01 16:33:35
+*/
+public interface NoticeReadService extends IService<NoticeRead> {
+
+}

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

@@ -0,0 +1,13 @@
+package com.dt.common.service;
+
+import com.dt.common.domain.Notice;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author sunday
+* @description 针对表【notice(通知公告表)】的数据库操作Service
+* @createDate 2025-07-01 16:33:35
+*/
+public interface NoticeService extends IService<Notice> {
+
+}

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

@@ -0,0 +1,13 @@
+package com.dt.common.service;
+
+import com.dt.common.domain.OperationLog;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author sunday
+* @description 针对表【operation_log(操作日志表)】的数据库操作Service
+* @createDate 2025-07-01 16:33:35
+*/
+public interface OperationLogService extends IService<OperationLog> {
+
+}

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

@@ -0,0 +1,13 @@
+package com.dt.common.service;
+
+import com.dt.common.domain.ParentChild;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author sunday
+* @description 针对表【parent_child(家长儿童关系表)】的数据库操作Service
+* @createDate 2025-07-01 16:33:35
+*/
+public interface ParentChildService extends IService<ParentChild> {
+
+}

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

@@ -0,0 +1,13 @@
+package com.dt.common.service;
+
+import com.dt.common.domain.SleepRecord;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author sunday
+* @description 针对表【sleep_record(睡眠记录表)】的数据库操作Service
+* @createDate 2025-07-01 16:33:35
+*/
+public interface SleepRecordService extends IService<SleepRecord> {
+
+}

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

@@ -0,0 +1,13 @@
+package com.dt.common.service;
+
+import com.dt.common.domain.SystemConfig;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author sunday
+* @description 针对表【system_config(系统配置表)】的数据库操作Service
+* @createDate 2025-07-01 16:33:35
+*/
+public interface SystemConfigService extends IService<SystemConfig> {
+
+}

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

@@ -0,0 +1,13 @@
+package com.dt.common.service;
+
+import com.dt.common.domain.TemperatureRecord;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author sunday
+* @description 针对表【temperature_record(体温记录表)】的数据库操作Service
+* @createDate 2025-07-01 16:33:35
+*/
+public interface TemperatureRecordService extends IService<TemperatureRecord> {
+
+}

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

@@ -0,0 +1,13 @@
+package com.dt.common.service;
+
+import com.dt.common.domain.ToiletRecord;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+* @author sunday
+* @description 针对表【toilet_record(如厕记录表)】的数据库操作Service
+* @createDate 2025-07-01 16:33:35
+*/
+public interface ToiletRecordService extends IService<ToiletRecord> {
+
+}

+ 13 - 0
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-01 16:33:35
+*/
+public interface UserService extends IService<User> {
+
+}

+ 25 - 0
src/main/java/com/dt/common/service/VideoService.java

@@ -0,0 +1,25 @@
+package com.dt.common.service;
+
+import com.dt.common.domain.Video;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.dt.dto.AddVideoDto;
+import com.dt.vo.Result;
+
+/**
+* @author lzy
+* @description 针对表【video(视频表)】的数据库操作Service
+* @createDate 2025-07-03 08:31:55
+*/
+public interface VideoService extends IService<Video> {
+
+//    添加视频
+    Result addVideo(AddVideoDto addVideoDto);
+
+
+//    查询视频
+    Result selVideo();
+
+//    查询精选视频
+
+
+}

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

@@ -0,0 +1,22 @@
+package com.dt.common.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dt.common.domain.AbnormalRecord;
+import com.dt.common.service.AbnormalRecordService;
+import com.dt.common.mapper.AbnormalRecordMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author sunday
+* @description 针对表【abnormal_record(异常情况记录表)】的数据库操作Service实现
+* @createDate 2025-07-01 16:33:35
+*/
+@Service
+public class AbnormalRecordServiceImpl extends ServiceImpl<AbnormalRecordMapper, AbnormalRecord>
+    implements AbnormalRecordService{
+
+}
+
+
+
+

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

@@ -0,0 +1,22 @@
+package com.dt.common.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dt.common.domain.CaregiverGroup;
+import com.dt.common.service.CaregiverGroupService;
+import com.dt.common.mapper.CaregiverGroupMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author sunday
+* @description 针对表【caregiver_group(护理人员与班级关联表)】的数据库操作Service实现
+* @createDate 2025-07-01 16:33:35
+*/
+@Service
+public class CaregiverGroupServiceImpl extends ServiceImpl<CaregiverGroupMapper, CaregiverGroup>
+    implements CaregiverGroupService{
+
+}
+
+
+
+

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

@@ -0,0 +1,22 @@
+package com.dt.common.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dt.common.domain.ChildGroup;
+import com.dt.common.service.ChildGroupService;
+import com.dt.common.mapper.ChildGroupMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author sunday
+* @description 针对表【child_group(班级/分组表)】的数据库操作Service实现
+* @createDate 2025-07-01 16:33:35
+*/
+@Service
+public class ChildGroupServiceImpl extends ServiceImpl<ChildGroupMapper, ChildGroup>
+    implements ChildGroupService{
+
+}
+
+
+
+

+ 93 - 0
src/main/java/com/dt/common/service/impl/ChildServiceImpl.java

@@ -0,0 +1,93 @@
+package com.dt.common.service.impl;
+
+import cn.hutool.core.util.IdUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dt.common.domain.CaregiverGroup;
+import com.dt.common.domain.Child;
+import com.dt.common.domain.ParentChild;
+import com.dt.common.mapper.ParentChildMapper;
+import com.dt.common.service.ChildService;
+import com.dt.common.mapper.ChildMapper;
+import com.dt.vo.Result;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+* @author sunday
+* @description 针对表【child(儿童表)】的数据库操作Service实现
+* @createDate 2025-07-01 16:33:35
+*/
+@Service
+public class ChildServiceImpl extends ServiceImpl<ChildMapper, Child>
+    implements ChildService{
+
+
+    @Resource
+    private ParentChildMapper parentChildMapper;
+
+//    添加幼儿
+    @Override
+    @Transactional
+    public Result addChild(Child child) {
+        try {
+            child.setId(IdUtil.getSnowflake().nextId());
+            child.setStatus(0);
+            child.setCreateTime(new Date());
+            child.setUpdateTime(new Date());
+            int insert = this.baseMapper.insert(child);
+            if (insert > 0){
+                Long userId = child.getUserId();
+                ParentChild parentChild=new ParentChild();
+                parentChild.setId(IdUtil.getSnowflake().nextId());
+                parentChild.setChildId(child.getId());
+                parentChild.setParentId(userId);
+                parentChild.setRelation(child.getRelation());
+                parentChild.setCreateTime(new Date());
+                parentChild.setIsPrimary(1);
+                int insert1 = parentChildMapper.insert(parentChild);
+                if (insert1 > 0){
+                    return Result.ok(insert, "添加成功");
+                }
+                return Result.Err(null, "添加失败");
+            }
+            return Result.Err(null, "添加失败");
+        } catch (Exception e) {
+            e.printStackTrace();
+            return Result.Err(null, "添加失败");
+        }
+    }
+
+//    查询幼儿
+    @Override
+    @Transactional
+    public Result selChild(Long userId) {
+        try {
+            List<ParentChild> parentChildren = parentChildMapper.selectList(new LambdaQueryWrapper<ParentChild>().eq(ParentChild::getParentId, userId));
+            List<Long> collect = parentChildren.stream().map(opt -> opt.getChildId()).collect(Collectors.toList());
+            List<Child> children = this.baseMapper.selectBatchIds(collect);
+            return Result.ok(children, "查询成功");
+        }catch (Exception e) {
+            e.printStackTrace();
+        }
+        return Result.Err(null, "查询失败");
+    }
+
+
+
+
+
+
+
+
+
+}
+
+
+
+

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

@@ -0,0 +1,22 @@
+package com.dt.common.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dt.common.domain.FoodRecord;
+import com.dt.common.service.FoodRecordService;
+import com.dt.common.mapper.FoodRecordMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author sunday
+* @description 针对表【food_record(饮食记录表)】的数据库操作Service实现
+* @createDate 2025-07-01 16:33:35
+*/
+@Service
+public class FoodRecordServiceImpl extends ServiceImpl<FoodRecordMapper, FoodRecord>
+    implements FoodRecordService{
+
+}
+
+
+
+

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

@@ -0,0 +1,22 @@
+package com.dt.common.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dt.common.domain.GrowthRecord;
+import com.dt.common.service.GrowthRecordService;
+import com.dt.common.mapper.GrowthRecordMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author sunday
+* @description 针对表【growth_record(身高体重记录表)】的数据库操作Service实现
+* @createDate 2025-07-01 16:33:35
+*/
+@Service
+public class GrowthRecordServiceImpl extends ServiceImpl<GrowthRecordMapper, GrowthRecord>
+    implements GrowthRecordService{
+
+}
+
+
+
+

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

@@ -0,0 +1,22 @@
+package com.dt.common.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dt.common.domain.Message;
+import com.dt.common.service.MessageService;
+import com.dt.common.mapper.MessageMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author sunday
+* @description 针对表【message(消息表)】的数据库操作Service实现
+* @createDate 2025-07-01 16:33:35
+*/
+@Service
+public class MessageServiceImpl extends ServiceImpl<MessageMapper, Message>
+    implements MessageService{
+
+}
+
+
+
+

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

@@ -0,0 +1,22 @@
+package com.dt.common.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dt.common.domain.MilestoneRecord;
+import com.dt.common.service.MilestoneRecordService;
+import com.dt.common.mapper.MilestoneRecordMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author sunday
+* @description 针对表【milestone_record(发育里程碑记录表)】的数据库操作Service实现
+* @createDate 2025-07-01 16:33:35
+*/
+@Service
+public class MilestoneRecordServiceImpl extends ServiceImpl<MilestoneRecordMapper, MilestoneRecord>
+    implements MilestoneRecordService{
+
+}
+
+
+
+

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

@@ -0,0 +1,22 @@
+package com.dt.common.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dt.common.domain.NoticeRead;
+import com.dt.common.service.NoticeReadService;
+import com.dt.common.mapper.NoticeReadMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author sunday
+* @description 针对表【notice_read(通知阅读状态表)】的数据库操作Service实现
+* @createDate 2025-07-01 16:33:35
+*/
+@Service
+public class NoticeReadServiceImpl extends ServiceImpl<NoticeReadMapper, NoticeRead>
+    implements NoticeReadService{
+
+}
+
+
+
+

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

@@ -0,0 +1,22 @@
+package com.dt.common.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dt.common.domain.Notice;
+import com.dt.common.service.NoticeService;
+import com.dt.common.mapper.NoticeMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author sunday
+* @description 针对表【notice(通知公告表)】的数据库操作Service实现
+* @createDate 2025-07-01 16:33:35
+*/
+@Service
+public class NoticeServiceImpl extends ServiceImpl<NoticeMapper, Notice>
+    implements NoticeService{
+
+}
+
+
+
+

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

@@ -0,0 +1,22 @@
+package com.dt.common.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dt.common.domain.OperationLog;
+import com.dt.common.service.OperationLogService;
+import com.dt.common.mapper.OperationLogMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author sunday
+* @description 针对表【operation_log(操作日志表)】的数据库操作Service实现
+* @createDate 2025-07-01 16:33:35
+*/
+@Service
+public class OperationLogServiceImpl extends ServiceImpl<OperationLogMapper, OperationLog>
+    implements OperationLogService{
+
+}
+
+
+
+

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

@@ -0,0 +1,22 @@
+package com.dt.common.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dt.common.domain.ParentChild;
+import com.dt.common.service.ParentChildService;
+import com.dt.common.mapper.ParentChildMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author sunday
+* @description 针对表【parent_child(家长儿童关系表)】的数据库操作Service实现
+* @createDate 2025-07-01 16:33:35
+*/
+@Service
+public class ParentChildServiceImpl extends ServiceImpl<ParentChildMapper, ParentChild>
+    implements ParentChildService{
+
+}
+
+
+
+

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

@@ -0,0 +1,22 @@
+package com.dt.common.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dt.common.domain.SleepRecord;
+import com.dt.common.service.SleepRecordService;
+import com.dt.common.mapper.SleepRecordMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author sunday
+* @description 针对表【sleep_record(睡眠记录表)】的数据库操作Service实现
+* @createDate 2025-07-01 16:33:35
+*/
+@Service
+public class SleepRecordServiceImpl extends ServiceImpl<SleepRecordMapper, SleepRecord>
+    implements SleepRecordService{
+
+}
+
+
+
+

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

@@ -0,0 +1,22 @@
+package com.dt.common.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dt.common.domain.SystemConfig;
+import com.dt.common.service.SystemConfigService;
+import com.dt.common.mapper.SystemConfigMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author sunday
+* @description 针对表【system_config(系统配置表)】的数据库操作Service实现
+* @createDate 2025-07-01 16:33:35
+*/
+@Service
+public class SystemConfigServiceImpl extends ServiceImpl<SystemConfigMapper, SystemConfig>
+    implements SystemConfigService{
+
+}
+
+
+
+

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

@@ -0,0 +1,22 @@
+package com.dt.common.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dt.common.domain.TemperatureRecord;
+import com.dt.common.service.TemperatureRecordService;
+import com.dt.common.mapper.TemperatureRecordMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author sunday
+* @description 针对表【temperature_record(体温记录表)】的数据库操作Service实现
+* @createDate 2025-07-01 16:33:35
+*/
+@Service
+public class TemperatureRecordServiceImpl extends ServiceImpl<TemperatureRecordMapper, TemperatureRecord>
+    implements TemperatureRecordService{
+
+}
+
+
+
+

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

@@ -0,0 +1,22 @@
+package com.dt.common.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dt.common.domain.ToiletRecord;
+import com.dt.common.service.ToiletRecordService;
+import com.dt.common.mapper.ToiletRecordMapper;
+import org.springframework.stereotype.Service;
+
+/**
+* @author sunday
+* @description 针对表【toilet_record(如厕记录表)】的数据库操作Service实现
+* @createDate 2025-07-01 16:33:35
+*/
+@Service
+public class ToiletRecordServiceImpl extends ServiceImpl<ToiletRecordMapper, ToiletRecord>
+    implements ToiletRecordService{
+
+}
+
+
+
+

+ 22 - 0
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-01 16:33:35
+*/
+@Service
+public class UserServiceImpl extends ServiceImpl<UserMapper, User>
+    implements UserService{
+
+}
+
+
+
+

+ 57 - 0
src/main/java/com/dt/common/service/impl/VideoServiceImpl.java

@@ -0,0 +1,57 @@
+package com.dt.common.service.impl;
+
+import cn.hutool.core.util.IdUtil;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.dt.common.domain.Video;
+import com.dt.common.service.VideoService;
+import com.dt.common.mapper.VideoMapper;
+import com.dt.dto.AddVideoDto;
+import com.dt.vo.Result;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+/**
+* @author lzy
+* @description 针对表【video(视频表)】的数据库操作Service实现
+* @createDate 2025-07-03 08:31:55
+*/
+@Service
+public class VideoServiceImpl extends ServiceImpl<VideoMapper, Video>
+    implements VideoService{
+
+//    添加视频
+    @Override
+    @Transactional
+    public Result addVideo(AddVideoDto addVideoDto) {
+        Video video = new Video();
+        video.setId(IdUtil.getSnowflake().nextId());
+        video.setImg(addVideoDto.getImg());
+        video.setTitle(addVideoDto.getTitle());
+        video.setUrl(addVideoDto.getUrl());
+        video.setViewCount(0);
+        video.setLikeCount(0);
+        video.setCommentCount(0);
+        video.setFavoritesCount(0);
+        video.setIsFeatured(addVideoDto.getIsFeatured());
+
+        int insert = this.baseMapper.insert(video);
+        if (insert > 0){
+            return Result.ok(video, "添加成功");
+        }
+        return  Result.Err(null, "添加失败");
+    }
+//  查询所有视频
+    @Override
+    public Result selVideo() {
+        List<Video> videos = this.baseMapper.selectList(null);
+        return Result.ok(videos, "查询成功");
+    }
+
+
+}
+
+
+
+

+ 27 - 0
src/main/java/com/dt/config/ApiException.java

@@ -0,0 +1,27 @@
+package com.dt.config;
+
+
+import lombok.Data;
+
+@Data
+public class ApiException extends RuntimeException{
+	
+	public Integer code;
+	public String msg;
+	public ApiException(BaseExceptionEnum baseExceptionEnum) {
+		super(baseExceptionEnum.getMessage());
+		this.code = baseExceptionEnum.getCode();
+		this.msg = baseExceptionEnum.getMessage();
+	}
+	public ApiException(String message) {
+		super(message);
+		this.code=101;
+		this.msg=message;
+	}
+	public ApiException(Integer code, String message) {
+		super(message);
+		this.code=code;
+		this.msg=message;
+	}
+
+}

+ 18 - 0
src/main/java/com/dt/config/BaseExceptionEnum.java

@@ -0,0 +1,18 @@
+package com.dt.config;
+
+/**
+ * 抽象接口
+ *
+ */
+public interface BaseExceptionEnum {
+
+    /**
+     * 获取异常编码
+     */
+    Integer getCode();
+
+    /**
+     * 获取异常信息
+     */
+    String getMessage();
+}

+ 6 - 0
src/main/java/com/dt/config/CommonContants.java

@@ -0,0 +1,6 @@
+package com.dt.config;
+
+public class CommonContants {
+    public static final String PREFIX_TOKEN="token:";
+    public static final ThreadLocal<String> local=new ThreadLocal<>();
+}

+ 11 - 0
src/main/java/com/dt/config/NonLoginRequired.java

@@ -0,0 +1,11 @@
+package com.dt.config;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface NonLoginRequired {
+}

+ 21 - 0
src/main/java/com/dt/config/WebMvcConfig.java

@@ -0,0 +1,21 @@
+package com.dt.config;
+
+
+import com.dt.intercepter.AuthIntercepter;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+@Configuration
+public class WebMvcConfig implements WebMvcConfigurer {
+
+    @Autowired
+    private AuthIntercepter authIntercepter;
+
+    @Override
+    public void addInterceptors(InterceptorRegistry registry) {
+        registry.addInterceptor(authIntercepter)
+                .addPathPatterns("/**");
+    }
+}

+ 63 - 0
src/main/java/com/dt/dto/AddVideoDto.java

@@ -0,0 +1,63 @@
+package com.dt.dto;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+@Data
+public class AddVideoDto {
+
+
+
+
+    /**
+     * 标签
+     */
+    @NotBlank(message = "标题不能为空")
+    private String title;
+
+    /**
+     * 图片
+     */
+    @NotNull(message = "图片不能为空")
+    private String img;
+
+    /**
+     * 路径
+     */
+    @NotBlank(message = "路径不能为空")
+    private String url;
+
+    /**
+     * 观看数量
+     */
+    @NotNull(message = "观看数量不能为空")
+    private Integer viewCount;
+
+    /**
+     * 点赞数量
+     */
+    @NotNull(message = "点赞数量不能为空")
+    private Integer likeCount;
+
+    /**
+     * 品论数量
+     */
+    @NotNull(message = "品论数量不能为空")
+    private Integer commentCount;
+
+    /**
+     * 收藏数量
+     */
+    @NotNull(message = "收藏数量不能为空")
+    private Integer favoritesCount;
+
+    /**
+     * 是否精选视频
+     */
+    @NotNull(message = "是否精选视频不能为空")
+    private Integer isFeatured;
+
+
+}

+ 79 - 0
src/main/java/com/dt/intercepter/AuthIntercepter.java

@@ -0,0 +1,79 @@
+package com.dt.intercepter;
+
+
+import com.dt.config.ApiException;
+import com.dt.config.CommonContants;
+import com.dt.config.NonLoginRequired;
+import com.dt.util.TokenUtils;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.StringRedisTemplate;
+import org.springframework.stereotype.Component;
+import org.springframework.util.StringUtils;
+import org.springframework.web.method.HandlerMethod;
+import org.springframework.web.servlet.HandlerInterceptor;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.lang.reflect.Method;
+
+@Component
+@Slf4j
+public class AuthIntercepter implements HandlerInterceptor {
+
+
+    @Autowired
+    private StringRedisTemplate stringRedisTemplate;
+
+
+
+    public final static String Token="token";
+
+    public AuthIntercepter() {
+
+    }
+
+    public boolean preHandle(HttpServletRequest request, HttpServletResponse response,Object handle)
+    {
+        String token  = request.getHeader(Token);
+        String requestURI = request.getRequestURI();
+        System.err.println(requestURI);
+        if (requestURI.equals("/user/login")){
+            return true;
+        }
+        try {
+            if (!(handle instanceof HandlerMethod))
+            {
+                return true;
+            }
+            HandlerMethod handlerMethod=(HandlerMethod)handle;
+            Method method = handlerMethod.getMethod();
+
+            NonLoginRequired loginRequired = method.getAnnotation(NonLoginRequired.class);
+            if (loginRequired!=null)
+            {
+                return true;
+            }
+            if (StringUtils.isEmpty(token))
+            {
+                log.info("token为空");
+                throw new Exception("token错误,请重新登录");
+            }
+            if (token!=null){
+                Long userId = TokenUtils.getUserId(token);
+                log.info("userId",userId);
+                String s = stringRedisTemplate.opsForValue().get(userId);
+                if (!s.equals(token))
+                {
+                    log.info("*************用户不存在");
+                    throw new ApiException(101,"token错误");
+                }
+                CommonContants.local.set(userId.toString());
+            }
+        } catch (Exception e) {
+            log.info("调用了异常通知",e.getMessage());
+            throw new RuntimeException(e);
+        }
+        return true;
+    }
+}

+ 119 - 0
src/main/java/com/dt/oss/OSSService.java

@@ -0,0 +1,119 @@
+package com.dt.oss;
+
+import com.aliyun.oss.OSS;
+import com.aliyun.oss.OSSClientBuilder;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.UUID;
+
+@Service
+
+public class OSSService {
+
+    @Value("${oss.endpoint}")
+    private String endpoint;
+
+    @Value("${oss.accessKeyId}")
+    private String accessKeyId;
+
+    @Value("${oss.accessKeySecret}")
+    private String accessKeySecret;
+
+    @Value("${oss.bucketName}")
+    private String bucketName;
+
+    // 允许的视频文件类型
+    private static final String[] ALLOWED_VIDEO_TYPES = {
+            "video/mp4", "video/quicktime", "video/x-msvideo",
+            "video/x-ms-wmv", "video/webm", "video/3gpp"
+    };
+
+    // 允许的视频文件扩展名
+    private static final String[] ALLOWED_VIDEO_EXTENSIONS = {
+            ".mp4", ".mov", ".avi", ".wmv", ".webm", ".3gp"
+    };
+
+    /**
+     * 上传文件到OSS(支持图片和视频)
+     * @param file 上传的文件
+     * @return 文件访问URL
+     * @throws IOException
+     */
+    public String upload(MultipartFile file) throws IOException {
+        // 验证文件类型
+        validateFileType(file);
+
+        // 生成唯一文件名
+        String originalFilename = file.getOriginalFilename();
+        String fileExtension = originalFilename.substring(originalFilename.lastIndexOf(".")).toLowerCase();
+        String objectName = generateUniqueFileName(fileExtension);
+
+        // 上传到OSS
+        OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
+        try {
+            ossClient.putObject(bucketName, objectName, file.getInputStream());
+            return generateUrl(objectName);
+        } finally {
+            ossClient.shutdown();
+        }
+    }
+    // 允许的图片文件类型
+    private static final String[] ALLOWED_IMAGE_TYPES = {
+            "image/jpeg", "image/png", "image/gif", "image/webp"
+    };
+
+    // 允许的图片文件扩展名
+    private static final String[] ALLOWED_IMAGE_EXTENSIONS = {
+            ".jpg", ".jpeg", ".png", ".gif", ".webp"
+    };
+
+    /**
+     * 验证文件类型是否为允许的类型
+     * @param file 上传的文件
+     * @throws IOException 如果文件类型不被允许
+     */
+    private void validateFileType(MultipartFile file) throws IOException {
+        String contentType = file.getContentType();
+        String originalFilename = file.getOriginalFilename();
+        String fileExtension = originalFilename.substring(originalFilename.lastIndexOf(".")).toLowerCase();
+
+        // 检查是否为允许的视频或图片扩展名
+        boolean isValidExtension = Arrays.stream(ALLOWED_VIDEO_EXTENSIONS)
+                .anyMatch(ext -> ext.equals(fileExtension)) ||
+                Arrays.stream(ALLOWED_IMAGE_EXTENSIONS)
+                        .anyMatch(ext -> ext.equals(fileExtension));
+
+        // 检查是否为允许的 MIME 类型
+        boolean isValidContentType = contentType != null &&
+                (Arrays.stream(ALLOWED_VIDEO_TYPES).anyMatch(type -> type.equals(contentType)) ||
+                        Arrays.stream(ALLOWED_IMAGE_TYPES).anyMatch(type -> type.equals(contentType)));
+
+        if (!isValidExtension || !isValidContentType) {
+            throw new IOException("不支持的文件类型");
+        }
+    }
+    /**
+     * 生成唯一的文件名
+     * @param fileExtension 文件扩展名
+     * @return 唯一文件名
+     */
+    private String generateUniqueFileName(String fileExtension) {
+        String uuidPart = UUID.randomUUID().toString().substring(2, 10);
+        long timestamp = System.currentTimeMillis() + 1000L * 60 * 60 * 24 * 7;
+        return timestamp + uuidPart + fileExtension;
+    }
+
+    /**
+     * 生成文件访问URL
+     * @param objectName OSS对象名称
+     * @return 完整的访问URL
+     */
+    private String generateUrl(String objectName) {
+        return "https://" + bucketName + "." + endpoint.replace("https://", "") + "/" + objectName;
+    }
+}

+ 37 - 0
src/main/java/com/dt/oss/controller/OSSController.java

@@ -0,0 +1,37 @@
+package com.dt.oss.controller;
+
+import com.dt.config.NonLoginRequired;
+import com.dt.oss.OSSService;
+import com.sun.istack.internal.NotNull;
+import org.springframework.validation.annotation.Validated;
+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;
+
+import javax.annotation.Resource;
+import java.io.IOException;
+
+@RequestMapping("/oss")
+@RestController
+public class OSSController {
+
+
+
+    @Resource
+    private OSSService ossService;
+
+
+    @RequestMapping("/upload")
+    @NonLoginRequired
+    public String upload(@RequestPart("file") MultipartFile file) {
+        try {
+            String url = ossService.upload(file);
+            return url;
+        } catch (IOException e) {
+            return "上传失败: ";
+        }
+    }
+
+
+}

+ 67 - 0
src/main/java/com/dt/util/Md5Utils.java

@@ -0,0 +1,67 @@
+package com.dt.util;
+import java.security.MessageDigest;
+import java.util.Random;
+/**
+ * @version 1.0
+ * @Author ZZX
+ * @Date 2022/12/19 17:35
+ */
+public class Md5Utils {
+    /**
+     * md5 加密
+     *
+     * @param saltAndPwd
+     * @return
+     */
+    public static String encode(String saltAndPwd) {
+        try {
+            return
+                    toHex(MessageDigest.getInstance("MD5").digest(saltAndPwd.getBytes("UTF-8"))).toLowerCase();
+        } catch (Exception e) {
+            throw new RuntimeException("md5 加密", e);
+        }
+    }
+    /**
+     * 十六进制字符
+     */
+    private static final char[] HEX_CHARS =
+            "0123456789ABCDEF".toCharArray();
+    /**
+     * 转换为十六进制字符串
+     *
+     * @param bytes
+     * @return
+     */
+    private static String toHex(byte[] bytes) {
+        StringBuilder str = new StringBuilder(bytes.length * 2);
+        final int fifteen = 0x0f;//十六进制中的 15
+        for (byte b : bytes) {//byte 为 32 位
+            str.append(HEX_CHARS[(b >> 4) & fifteen]);//获取第 25 位到第 28 位的二进制数
+            str.append(HEX_CHARS[b & fifteen]);//获取第 29 位到第 32 位的二进制数
+        }
+        return str.toString();
+    }
+    /**
+     * 随机生成10位密码盐
+     * @return
+     */
+    public static String getSalt() {
+        char[] chars =
+                ("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" +
+                        "1234567890!@#$%^&*()_+").toCharArray();
+        StringBuilder sb = new StringBuilder();
+        for (int i = 0; i < 30; i++) {
+            //Random().nextInt()返回值为[0,n)
+            char aChar = chars[new Random().nextInt(chars.length)];
+            sb.append(aChar);
+        }
+        return sb.toString();
+    }
+    // 测试
+    public static void main(String[] args) {
+        String salt = getSalt();// get the salt
+        String pwd = "123456";// the inital pwd
+        String saltPwd = encode(salt + pwd);//calculate the new-pwd by the salt and the inital pwd
+        System.out.println(saltPwd);// sout to test
+    }
+}

+ 64 - 0
src/main/java/com/dt/util/RRException.java

@@ -0,0 +1,64 @@
+package com.dt.util;
+
+/**
+ * 增强版业务异常类
+ * 包含错误码、错误信息、可选数据载荷
+ */
+public class RRException extends RuntimeException {
+
+
+    private final int code;
+    private final String msg;
+    private transient Object data; // transient避免序列化问题
+
+    // 常用构造方法
+    public RRException(int code, String msg) {
+        super(msg);
+        this.code = code;
+        this.msg = msg;
+    }
+
+    public RRException(int code, String msg, Object data) {
+        super(msg);
+        this.code = code;
+        this.msg = msg;
+        this.data = data;
+    }
+
+    public RRException(int code, String msg, Throwable cause) {
+        super(msg, cause);
+        this.code = code;
+        this.msg = msg;
+    }
+
+    // 快速创建异常的静态工厂方法
+    public static RRException of(int code, String msg) {
+        return new RRException(code, msg);
+    }
+
+    public static RRException of(int code, String msg, Object data) {
+        return new RRException(code, msg, data);
+    }
+
+    // Getter 方法
+    public int getCode() {
+        return code;
+    }
+
+    public String getMsg() {
+        return msg;
+    }
+
+    public Object getData() {
+        return data;
+    }
+
+    @Override
+    public String toString() {
+        return "RRException{" +
+                "code=" + code +
+                ", msg='" + msg + '\'' +
+                ", data=" + data +
+                '}';
+    }
+}

+ 113 - 0
src/main/java/com/dt/util/TokenUtils.java

@@ -0,0 +1,113 @@
+package com.dt.util;
+
+
+
+import io.jsonwebtoken.Claims;
+import io.jsonwebtoken.JwtBuilder;
+import io.jsonwebtoken.Jwts;
+import io.jsonwebtoken.SignatureAlgorithm;
+
+import javax.crypto.spec.SecretKeySpec;
+import javax.xml.bind.DatatypeConverter;
+import java.security.Key;
+import java.util.Date;
+
+/**
+ * 生成Token工具类
+ */
+public class TokenUtils {
+
+    /**
+     * 签名秘钥
+     */
+    public static final String SECRET = "cjyfutu1688";
+
+    /**
+     * 生成token
+     * @param id 一般传入userName
+     * @return
+     */
+    public static String createJwtToken(String id){
+        String issuer = "www.futureading.com";
+        String subject = "65532781@qq.com";
+        long ttlMillis = System.currentTimeMillis();
+        return createJwtToken(id, issuer, subject, ttlMillis);
+    }
+
+    /**
+     * 生成Token
+     *
+     * @param id
+     *            编号
+     * @param issuer
+     *            该JWT的签发者,是否使用是可选的
+     * @param subject
+     *            该JWT所面向的用户,是否使用是可选的;
+     * @param ttlMillis
+     *            签发时间
+     * @return token String
+     */
+    public static String createJwtToken(String id, String issuer, String subject, long ttlMillis) {
+
+        // 签名算法 ,将对token进行签名
+        SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256;
+
+        // 生成签发时间
+        long nowMillis = System.currentTimeMillis();
+        Date now = new Date(nowMillis);
+
+        // 通过秘钥签名JWT
+        byte[] apiKeySecretBytes = DatatypeConverter.parseBase64Binary(SECRET);
+        Key signingKey = new SecretKeySpec(apiKeySecretBytes, signatureAlgorithm.getJcaName());
+
+        // Let's set the JWT Claims
+        JwtBuilder builder = Jwts.builder().setId(id)
+                .setIssuedAt(now)
+                .setSubject(subject)
+                .setIssuer(issuer)
+                .signWith(signatureAlgorithm, signingKey);
+
+        // if it has been specified, let's add the expiration
+        if (ttlMillis >= 0) {
+            long expMillis = nowMillis + ttlMillis;
+            Date exp = new Date(expMillis);
+            builder.setExpiration(exp);
+        }
+
+        // Builds the JWT and serializes it to a compact, URL-safe string
+        return builder.compact();
+
+    }
+
+    // Sample method to validate and read the JWT
+    public static Claims parseJWT(String jwt) {
+        // This line will throw an exception if it is not a signed JWS (as expected)
+        Claims claims = Jwts.parser()
+                .setSigningKey(DatatypeConverter.parseBase64Binary(SECRET))
+                .parseClaimsJws(jwt).getBody();
+        return claims;
+    }
+
+    public static Long getUserId(String token){
+        Claims claims = null;
+        try {
+            claims = TokenUtils.parseJWT(token);
+        } catch (Exception e) {
+            throw new RRException(101, "token错误,请重新登录");
+        }
+
+        if(null==claims) {
+            throw new RRException(101, "token错误,请重新登录");
+        }
+        String id = claims.getId();
+        Long userId=Long.valueOf(id);
+
+        return userId;
+
+
+    }
+
+    public static void main(String[] args) {
+        System.out.println(TokenUtils.createJwtToken("admin"));
+    }
+}

+ 34 - 0
src/main/java/com/dt/vo/Result.java

@@ -0,0 +1,34 @@
+package com.dt.vo;
+
+import lombok.Data;
+
+@Data
+public class Result {
+
+
+    private Integer code;
+
+    private Object data;
+    private String message;
+
+
+
+
+
+    public static Result ok(Object data,String message) {
+    	Result result = new Result();
+    	result.setCode(200);
+    	result.setData(data);
+        result.setMessage(message);
+    	return result;
+    }
+
+    public static Result Err(Object data,String message) {
+        Result result = new Result();
+        result.setCode(400);
+        result.setData(data);
+        result.setMessage(message);
+        return result;
+    }
+
+}

+ 66 - 0
src/main/resources/application.yml

@@ -0,0 +1,66 @@
+server:
+  port: 3333
+
+spring:
+  # application.yml配置
+  servlet:
+    multipart:
+      max-file-size: 200MB
+      max-request-size: 200MB
+  datasource:
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    url: jdbc:mysql://101.200.59.170:3306/child_care_system?useSSL=false&serverTimezone=UTC&characterEncoding=UTF-8
+    username: root
+    password: Lzy20051120
+  web:
+    resources:
+      static-locations: file:///D:/img/
+  redis:
+    host: 101.200.59.170
+    port: 6379
+    database: 0
+    template:
+      default-type: java.lang.String
+      enable-transaction-support: true
+      # 序列化器配置(新增)
+      serializer:
+        key: string
+        value: json
+
+
+logging:
+  level:
+    cn:
+      zhentao: debug
+
+
+
+
+
+#  kafka:
+#    producer:
+#      key-serializer: org.apache.kafka.common.serialization.StringSerializer
+#      value-serializer: org.apache.kafka.common.serialization.StringSerializer
+#      batch-size: 16384
+#      buffer-memory: 33554432
+#      retries: 3
+#      linger: 1
+#    bootstrap-servers: localhost:9092
+#    consumer:
+#      group-id: sms_group
+#      auto-offset-reset: latest #latest
+#      enable-auto-commit: false
+#      auto-commit-interval: 100
+#      max-poll-records: 500
+#      key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
+#      value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
+
+oss:
+  endpoint: oss-cn-beijing.aliyuncs.com
+  accessKeyId: LTAI5tSRDXqvdLAaeiw2NAcq
+  accessKeySecret: 73gVomAk5W4Q7UPxqQKOgQp1TyK6A0
+  bucketName: lzy8
+
+
+
+

+ 23 - 0
src/main/resources/com/dt/common/mapper/AbnormalRecordMapper.xml

@@ -0,0 +1,23 @@
+<?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.AbnormalRecordMapper">
+
+    <resultMap id="BaseResultMap" type="com.dt.common.domain.AbnormalRecord">
+            <id property="id" column="id" />
+            <result property="childId" column="child_id" />
+            <result property="recordTime" column="record_time" />
+            <result property="abnormalType" column="abnormal_type" />
+            <result property="description" column="description" />
+            <result property="treatment" column="treatment" />
+            <result property="isSerious" column="is_serious" />
+            <result property="recorderId" column="recorder_id" />
+            <result property="createTime" column="create_time" />
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,child_id,record_time,abnormal_type,description,treatment,
+        is_serious,recorder_id,create_time
+    </sql>
+</mapper>

+ 17 - 0
src/main/resources/com/dt/common/mapper/CaregiverGroupMapper.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="com.dt.common.mapper.CaregiverGroupMapper">
+
+    <resultMap id="BaseResultMap" type="com.dt.common.domain.CaregiverGroup">
+            <id property="id" column="id" />
+            <result property="caregiverId" column="caregiver_id" />
+            <result property="groupId" column="group_id" />
+            <result property="createTime" column="create_time" />
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,caregiver_id,group_id,create_time
+    </sql>
+</mapper>

+ 19 - 0
src/main/resources/com/dt/common/mapper/ChildGroupMapper.xml

@@ -0,0 +1,19 @@
+<?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.ChildGroupMapper">
+
+    <resultMap id="BaseResultMap" type="com.dt.common.domain.ChildGroup">
+            <id property="id" column="id" />
+            <result property="name" column="name" />
+            <result property="description" column="description" />
+            <result property="ageRange" column="age_range" />
+            <result property="createTime" column="create_time" />
+            <result property="updateTime" column="update_time" />
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,name,description,age_range,create_time,update_time
+    </sql>
+</mapper>

+ 25 - 0
src/main/resources/com/dt/common/mapper/ChildMapper.xml

@@ -0,0 +1,25 @@
+<?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.ChildMapper">
+
+    <resultMap id="BaseResultMap" type="com.dt.common.domain.Child">
+            <id property="id" column="id" />
+            <result property="name" column="name" />
+            <result property="gender" column="gender" />
+            <result property="birthday" column="birthday" />
+            <result property="avatar" column="avatar" />
+            <result property="groupId" column="group_id" />
+            <result property="remark" column="remark" />
+            <result property="status" column="status" />
+            <result property="createTime" column="create_time" />
+            <result property="updateTime" column="update_time" />
+            <result property="userId" column="user_id" />
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,name,gender,birthday,avatar,group_id,
+        remark,status,create_time,update_time,user_id
+    </sql>
+</mapper>

+ 23 - 0
src/main/resources/com/dt/common/mapper/FoodRecordMapper.xml

@@ -0,0 +1,23 @@
+<?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.FoodRecordMapper">
+
+    <resultMap id="BaseResultMap" type="com.dt.common.domain.FoodRecord">
+            <id property="id" column="id" />
+            <result property="childId" column="child_id" />
+            <result property="recordTime" column="record_time" />
+            <result property="mealType" column="meal_type" />
+            <result property="foodContent" column="food_content" />
+            <result property="amount" column="amount" />
+            <result property="remark" column="remark" />
+            <result property="recorderId" column="recorder_id" />
+            <result property="createTime" column="create_time" />
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,child_id,record_time,meal_type,food_content,amount,
+        remark,recorder_id,create_time
+    </sql>
+</mapper>

+ 23 - 0
src/main/resources/com/dt/common/mapper/GrowthRecordMapper.xml

@@ -0,0 +1,23 @@
+<?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.GrowthRecordMapper">
+
+    <resultMap id="BaseResultMap" type="com.dt.common.domain.GrowthRecord">
+            <id property="id" column="id" />
+            <result property="childId" column="child_id" />
+            <result property="recordTime" column="record_time" />
+            <result property="height" column="height" />
+            <result property="weight" column="weight" />
+            <result property="headCircumference" column="head_circumference" />
+            <result property="remark" column="remark" />
+            <result property="recorderId" column="recorder_id" />
+            <result property="createTime" column="create_time" />
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,child_id,record_time,height,weight,head_circumference,
+        remark,recorder_id,create_time
+    </sql>
+</mapper>

+ 22 - 0
src/main/resources/com/dt/common/mapper/MessageMapper.xml

@@ -0,0 +1,22 @@
+<?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.MessageMapper">
+
+    <resultMap id="BaseResultMap" type="com.dt.common.domain.Message">
+            <id property="id" column="id" />
+            <result property="senderId" column="sender_id" />
+            <result property="receiverId" column="receiver_id" />
+            <result property="content" column="content" />
+            <result property="messageType" column="message_type" />
+            <result property="isRead" column="is_read" />
+            <result property="readTime" column="read_time" />
+            <result property="sendTime" column="send_time" />
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,sender_id,receiver_id,content,message_type,is_read,
+        read_time,send_time
+    </sql>
+</mapper>

+ 22 - 0
src/main/resources/com/dt/common/mapper/MilestoneRecordMapper.xml

@@ -0,0 +1,22 @@
+<?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.MilestoneRecordMapper">
+
+    <resultMap id="BaseResultMap" type="com.dt.common.domain.MilestoneRecord">
+            <id property="id" column="id" />
+            <result property="childId" column="child_id" />
+            <result property="milestoneType" column="milestone_type" />
+            <result property="milestoneName" column="milestone_name" />
+            <result property="achieveTime" column="achieve_time" />
+            <result property="description" column="description" />
+            <result property="recorderId" column="recorder_id" />
+            <result property="createTime" column="create_time" />
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,child_id,milestone_type,milestone_name,achieve_time,description,
+        recorder_id,create_time
+    </sql>
+</mapper>

+ 25 - 0
src/main/resources/com/dt/common/mapper/NoticeMapper.xml

@@ -0,0 +1,25 @@
+<?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.NoticeMapper">
+
+    <resultMap id="BaseResultMap" type="com.dt.common.domain.Notice">
+            <id property="id" column="id" />
+            <result property="title" column="title" />
+            <result property="content" column="content" />
+            <result property="noticeType" column="notice_type" />
+            <result property="groupId" column="group_id" />
+            <result property="publisherId" column="publisher_id" />
+            <result property="publishTime" column="publish_time" />
+            <result property="isTop" column="is_top" />
+            <result property="status" column="status" />
+            <result property="createTime" column="create_time" />
+            <result property="updateTime" column="update_time" />
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id,title,content,notice_type,group_id,publisher_id,
+        publish_time,is_top,status,create_time,update_time
+    </sql>
+</mapper>

Some files were not shown because too many files changed in this diff