更改配置
Change-Id: Ibd1cf3c212dffe7952cbaab5e41886a3ebaae613
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..3b41682
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+/mvnw text eol=lf
+*.cmd text eol=crlf
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..549e00a
--- /dev/null
+++ b/.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/
diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties
new file mode 100644
index 0000000..d58dfb7
--- /dev/null
+++ b/.mvn/wrapper/maven-wrapper.properties
@@ -0,0 +1,19 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+wrapperVersion=3.3.2
+distributionType=only-script
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
diff --git a/mvnw b/mvnw
new file mode 100644
index 0000000..19529dd
--- /dev/null
+++ b/mvnw
@@ -0,0 +1,259 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Apache Maven Wrapper startup batch script, version 3.3.2
+#
+# Optional ENV vars
+# -----------------
+# JAVA_HOME - location of a JDK home dir, required when download maven via java source
+# MVNW_REPOURL - repo url base for downloading maven distribution
+# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
+# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output
+# ----------------------------------------------------------------------------
+
+set -euf
+[ "${MVNW_VERBOSE-}" != debug ] || set -x
+
+# OS specific support.
+native_path() { printf %s\\n "$1"; }
+case "$(uname)" in
+CYGWIN* | MINGW*)
+ [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")"
+ native_path() { cygpath --path --windows "$1"; }
+ ;;
+esac
+
+# set JAVACMD and JAVACCMD
+set_java_home() {
+ # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched
+ if [ -n "${JAVA_HOME-}" ]; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ]; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ JAVACCMD="$JAVA_HOME/jre/sh/javac"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ JAVACCMD="$JAVA_HOME/bin/javac"
+
+ if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then
+ echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2
+ echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2
+ return 1
+ fi
+ fi
+ else
+ JAVACMD="$(
+ 'set' +e
+ 'unset' -f command 2>/dev/null
+ 'command' -v java
+ )" || :
+ JAVACCMD="$(
+ 'set' +e
+ 'unset' -f command 2>/dev/null
+ 'command' -v javac
+ )" || :
+
+ if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then
+ echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2
+ return 1
+ fi
+ fi
+}
+
+# hash string like Java String::hashCode
+hash_string() {
+ str="${1:-}" h=0
+ while [ -n "$str" ]; do
+ char="${str%"${str#?}"}"
+ h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296))
+ str="${str#?}"
+ done
+ printf %x\\n $h
+}
+
+verbose() { :; }
+[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; }
+
+die() {
+ printf %s\\n "$1" >&2
+ exit 1
+}
+
+trim() {
+ # MWRAPPER-139:
+ # Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds.
+ # Needed for removing poorly interpreted newline sequences when running in more
+ # exotic environments such as mingw bash on Windows.
+ printf "%s" "${1}" | tr -d '[:space:]'
+}
+
+# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties
+while IFS="=" read -r key value; do
+ case "${key-}" in
+ distributionUrl) distributionUrl=$(trim "${value-}") ;;
+ distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;;
+ esac
+done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties"
+[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties"
+
+case "${distributionUrl##*/}" in
+maven-mvnd-*bin.*)
+ MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/
+ case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in
+ *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;;
+ :Darwin*x86_64) distributionPlatform=darwin-amd64 ;;
+ :Darwin*arm64) distributionPlatform=darwin-aarch64 ;;
+ :Linux*x86_64*) distributionPlatform=linux-amd64 ;;
+ *)
+ echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2
+ distributionPlatform=linux-amd64
+ ;;
+ esac
+ distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip"
+ ;;
+maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;;
+*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;;
+esac
+
+# apply MVNW_REPOURL and calculate MAVEN_HOME
+# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
+[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}"
+distributionUrlName="${distributionUrl##*/}"
+distributionUrlNameMain="${distributionUrlName%.*}"
+distributionUrlNameMain="${distributionUrlNameMain%-bin}"
+MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}"
+MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")"
+
+exec_maven() {
+ unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || :
+ exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD"
+}
+
+if [ -d "$MAVEN_HOME" ]; then
+ verbose "found existing MAVEN_HOME at $MAVEN_HOME"
+ exec_maven "$@"
+fi
+
+case "${distributionUrl-}" in
+*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;;
+*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;;
+esac
+
+# prepare tmp dir
+if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then
+ clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; }
+ trap clean HUP INT TERM EXIT
+else
+ die "cannot create temp dir"
+fi
+
+mkdir -p -- "${MAVEN_HOME%/*}"
+
+# Download and Install Apache Maven
+verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
+verbose "Downloading from: $distributionUrl"
+verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
+
+# select .zip or .tar.gz
+if ! command -v unzip >/dev/null; then
+ distributionUrl="${distributionUrl%.zip}.tar.gz"
+ distributionUrlName="${distributionUrl##*/}"
+fi
+
+# verbose opt
+__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR=''
+[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v
+
+# normalize http auth
+case "${MVNW_PASSWORD:+has-password}" in
+'') MVNW_USERNAME='' MVNW_PASSWORD='' ;;
+has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;;
+esac
+
+if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then
+ verbose "Found wget ... using wget"
+ wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl"
+elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then
+ verbose "Found curl ... using curl"
+ curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl"
+elif set_java_home; then
+ verbose "Falling back to use Java to download"
+ javaSource="$TMP_DOWNLOAD_DIR/Downloader.java"
+ targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName"
+ cat >"$javaSource" <<-END
+ public class Downloader extends java.net.Authenticator
+ {
+ protected java.net.PasswordAuthentication getPasswordAuthentication()
+ {
+ return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() );
+ }
+ public static void main( String[] args ) throws Exception
+ {
+ setDefault( new Downloader() );
+ java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() );
+ }
+ }
+ END
+ # For Cygwin/MinGW, switch paths to Windows format before running javac and java
+ verbose " - Compiling Downloader.java ..."
+ "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java"
+ verbose " - Running Downloader.java ..."
+ "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")"
+fi
+
+# If specified, validate the SHA-256 sum of the Maven distribution zip file
+if [ -n "${distributionSha256Sum-}" ]; then
+ distributionSha256Result=false
+ if [ "$MVN_CMD" = mvnd.sh ]; then
+ echo "Checksum validation is not supported for maven-mvnd." >&2
+ echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
+ exit 1
+ elif command -v sha256sum >/dev/null; then
+ if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then
+ distributionSha256Result=true
+ fi
+ elif command -v shasum >/dev/null; then
+ if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then
+ distributionSha256Result=true
+ fi
+ else
+ echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2
+ echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
+ exit 1
+ fi
+ if [ $distributionSha256Result = false ]; then
+ echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2
+ echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2
+ exit 1
+ fi
+fi
+
+# unzip and move
+if command -v unzip >/dev/null; then
+ unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip"
+else
+ tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar"
+fi
+printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url"
+mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME"
+
+clean || :
+exec_maven "$@"
diff --git a/mvnw.cmd b/mvnw.cmd
new file mode 100644
index 0000000..249bdf3
--- /dev/null
+++ b/mvnw.cmd
@@ -0,0 +1,149 @@
+<# : batch portion
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Apache Maven Wrapper startup batch script, version 3.3.2
+@REM
+@REM Optional ENV vars
+@REM MVNW_REPOURL - repo url base for downloading maven distribution
+@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
+@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output
+@REM ----------------------------------------------------------------------------
+
+@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0)
+@SET __MVNW_CMD__=
+@SET __MVNW_ERROR__=
+@SET __MVNW_PSMODULEP_SAVE=%PSModulePath%
+@SET PSModulePath=
+@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @(
+ IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B)
+)
+@SET PSModulePath=%__MVNW_PSMODULEP_SAVE%
+@SET __MVNW_PSMODULEP_SAVE=
+@SET __MVNW_ARG0_NAME__=
+@SET MVNW_USERNAME=
+@SET MVNW_PASSWORD=
+@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*)
+@echo Cannot start maven from wrapper >&2 && exit /b 1
+@GOTO :EOF
+: end batch / begin powershell #>
+
+$ErrorActionPreference = "Stop"
+if ($env:MVNW_VERBOSE -eq "true") {
+ $VerbosePreference = "Continue"
+}
+
+# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties
+$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl
+if (!$distributionUrl) {
+ Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties"
+}
+
+switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) {
+ "maven-mvnd-*" {
+ $USE_MVND = $true
+ $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip"
+ $MVN_CMD = "mvnd.cmd"
+ break
+ }
+ default {
+ $USE_MVND = $false
+ $MVN_CMD = $script -replace '^mvnw','mvn'
+ break
+ }
+}
+
+# apply MVNW_REPOURL and calculate MAVEN_HOME
+# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
+if ($env:MVNW_REPOURL) {
+ $MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" }
+ $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')"
+}
+$distributionUrlName = $distributionUrl -replace '^.*/',''
+$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$',''
+$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain"
+if ($env:MAVEN_USER_HOME) {
+ $MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain"
+}
+$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join ''
+$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME"
+
+if (Test-Path -Path "$MAVEN_HOME" -PathType Container) {
+ Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME"
+ Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
+ exit $?
+}
+
+if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) {
+ Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl"
+}
+
+# prepare tmp dir
+$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile
+$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir"
+$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null
+trap {
+ if ($TMP_DOWNLOAD_DIR.Exists) {
+ try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
+ catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
+ }
+}
+
+New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null
+
+# Download and Install Apache Maven
+Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
+Write-Verbose "Downloading from: $distributionUrl"
+Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
+
+$webclient = New-Object System.Net.WebClient
+if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) {
+ $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD)
+}
+[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
+$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null
+
+# If specified, validate the SHA-256 sum of the Maven distribution zip file
+$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum
+if ($distributionSha256Sum) {
+ if ($USE_MVND) {
+ Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties."
+ }
+ Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash
+ if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) {
+ Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property."
+ }
+}
+
+# unzip and move
+Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null
+Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null
+try {
+ Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null
+} catch {
+ if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) {
+ Write-Error "fail to move MAVEN_HOME"
+ }
+} finally {
+ try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
+ catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
+}
+
+Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..22f8f1c
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,111 @@
+<?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>
+ <parent>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-parent</artifactId>
+ <version>3.4.4</version>
+ <relativePath/> <!-- lookup parent from repository -->
+ </parent>
+ <groupId>com.pt5</groupId>
+ <artifactId>PT-houduan</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <name>PT-houduan</name>
+ <description>PT-houduan</description>
+ <url/>
+ <licenses>
+ <license/>
+ </licenses>
+ <developers>
+ <developer/>
+ </developers>
+ <scm>
+ <connection/>
+ <developerConnection/>
+ <tag/>
+ <url/>
+ </scm>
+ <properties>
+ <java.version>17</java.version>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-data-jpa</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-web</artifactId>
+ </dependency>
+
+ <!-- MyBatis-Plus -->
+ <dependency>
+ <groupId>com.baomidou</groupId>
+ <artifactId>mybatis-plus-boot-starter</artifactId>
+ <version>3.5.6</version>
+ </dependency>
+ <dependency>
+ <groupId>org.mybatis</groupId>
+ <artifactId>mybatis-spring</artifactId>
+ <version>3.0.3</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-devtools</artifactId>
+ <scope>runtime</scope>
+ <optional>true</optional>
+ </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>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <annotationProcessorPaths>
+ <path>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-maven-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>
+ <groupId>org.projectlombok</groupId>
+ <artifactId>lombok</artifactId>
+ </exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
diff --git a/src/main/java/com/pt5/pthouduan/PtHouduanApplication.java b/src/main/java/com/pt5/pthouduan/PtHouduanApplication.java
new file mode 100644
index 0000000..48a1325
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/PtHouduanApplication.java
@@ -0,0 +1,18 @@
+package com.pt5.pthouduan;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
+import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration;
+
+//@SpringBootApplication
+@SpringBootApplication
+@MapperScan("com.pt5.pthouduan.mapper")
+public class PtHouduanApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(PtHouduanApplication.class, args);
+ }
+
+}
diff --git a/src/main/java/com/pt5/pthouduan/controller/UserController.java b/src/main/java/com/pt5/pthouduan/controller/UserController.java
new file mode 100644
index 0000000..634f07f
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/controller/UserController.java
@@ -0,0 +1,32 @@
+package com.pt5.pthouduan.controller;
+
+import com.pt5.pthouduan.entity.User;
+import com.pt5.pthouduan.service.UserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ * 前端控制器
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@Controller
+@RequestMapping("/user")
+public class UserController {
+ @Autowired
+ private UserService userService;
+
+ // 创建用户
+ @PostMapping("/create")
+ @ResponseBody
+ public User createUser(@RequestBody User user) {
+ return userService.createUser(user);
+ }
+
+
+
+}
diff --git a/src/main/java/com/pt5/pthouduan/entity/Category.java b/src/main/java/com/pt5/pthouduan/entity/Category.java
new file mode 100644
index 0000000..c338fbb
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/entity/Category.java
@@ -0,0 +1,60 @@
+package com.pt5.pthouduan.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@TableName("category")
+public class Category implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId("categoryid")
+ private Integer categoryid;
+
+ private Integer categorytype;
+
+ private String categoryName;
+
+ public Integer getCategoryid() {
+ return categoryid;
+ }
+
+ public void setCategoryid(Integer categoryid) {
+ this.categoryid = categoryid;
+ }
+
+ public Integer getCategorytype() {
+ return categorytype;
+ }
+
+ public void setCategorytype(Integer categorytype) {
+ this.categorytype = categorytype;
+ }
+
+ public String getCategoryName() {
+ return categoryName;
+ }
+
+ public void setCategoryName(String categoryName) {
+ this.categoryName = categoryName;
+ }
+
+ @Override
+ public String toString() {
+ return "Category{" +
+ "categoryid = " + categoryid +
+ ", categorytype = " + categorytype +
+ ", categoryName = " + categoryName +
+ "}";
+ }
+}
diff --git a/src/main/java/com/pt5/pthouduan/entity/ChatInformation.java b/src/main/java/com/pt5/pthouduan/entity/ChatInformation.java
new file mode 100644
index 0000000..03ed650
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/entity/ChatInformation.java
@@ -0,0 +1,46 @@
+package com.pt5.pthouduan.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@TableName("chat_information")
+public class ChatInformation implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private Long userid;
+
+ private String chatimformation;
+
+ public Long getUserid() {
+ return userid;
+ }
+
+ public void setUserid(Long userid) {
+ this.userid = userid;
+ }
+
+ public String getChatimformation() {
+ return chatimformation;
+ }
+
+ public void setChatimformation(String chatimformation) {
+ this.chatimformation = chatimformation;
+ }
+
+ @Override
+ public String toString() {
+ return "ChatInformation{" +
+ "userid = " + userid +
+ ", chatimformation = " + chatimformation +
+ "}";
+ }
+}
diff --git a/src/main/java/com/pt5/pthouduan/entity/Comment.java b/src/main/java/com/pt5/pthouduan/entity/Comment.java
new file mode 100644
index 0000000..6b96288
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/entity/Comment.java
@@ -0,0 +1,72 @@
+package com.pt5.pthouduan.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@TableName("comment")
+public class Comment implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId("commentid")
+ private String commentid;
+
+ private Integer postid;
+
+ private String postCommentcontent;
+
+ private LocalDateTime commenttime;
+
+ public String getCommentid() {
+ return commentid;
+ }
+
+ public void setCommentid(String commentid) {
+ this.commentid = commentid;
+ }
+
+ public Integer getPostid() {
+ return postid;
+ }
+
+ public void setPostid(Integer postid) {
+ this.postid = postid;
+ }
+
+ public String getPostCommentcontent() {
+ return postCommentcontent;
+ }
+
+ public void setPostCommentcontent(String postCommentcontent) {
+ this.postCommentcontent = postCommentcontent;
+ }
+
+ public LocalDateTime getCommenttime() {
+ return commenttime;
+ }
+
+ public void setCommenttime(LocalDateTime commenttime) {
+ this.commenttime = commenttime;
+ }
+
+ @Override
+ public String toString() {
+ return "Comment{" +
+ "commentid = " + commentid +
+ ", postid = " + postid +
+ ", postCommentcontent = " + postCommentcontent +
+ ", commenttime = " + commenttime +
+ "}";
+ }
+}
diff --git a/src/main/java/com/pt5/pthouduan/entity/Follower.java b/src/main/java/com/pt5/pthouduan/entity/Follower.java
new file mode 100644
index 0000000..cf97e29
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/entity/Follower.java
@@ -0,0 +1,62 @@
+package com.pt5.pthouduan.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@TableName("follower")
+public class Follower implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId("userid")
+ private Long userid;
+
+ //@TableId("Use_userid")
+ private Long useUserid;
+
+ private LocalDateTime followstarttime;
+
+ public Long getUserid() {
+ return userid;
+ }
+
+ public void setUserid(Long userid) {
+ this.userid = userid;
+ }
+
+ public Long getUseUserid() {
+ return useUserid;
+ }
+
+ public void setUseUserid(Long useUserid) {
+ this.useUserid = useUserid;
+ }
+
+ public LocalDateTime getFollowstarttime() {
+ return followstarttime;
+ }
+
+ public void setFollowstarttime(LocalDateTime followstarttime) {
+ this.followstarttime = followstarttime;
+ }
+
+ @Override
+ public String toString() {
+ return "Follower{" +
+ "userid = " + userid +
+ ", useUserid = " + useUserid +
+ ", followstarttime = " + followstarttime +
+ "}";
+ }
+}
diff --git a/src/main/java/com/pt5/pthouduan/entity/FriendList.java b/src/main/java/com/pt5/pthouduan/entity/FriendList.java
new file mode 100644
index 0000000..82878c1
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/entity/FriendList.java
@@ -0,0 +1,80 @@
+package com.pt5.pthouduan.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@TableName("friend_list")
+public class FriendList implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private Long userid;
+
+ private Long friendid;
+
+ private LocalDateTime requesttime;
+
+ private Integer friendType;
+
+ private Integer friendRight;
+
+ public Long getUserid() {
+ return userid;
+ }
+
+ public void setUserid(Long userid) {
+ this.userid = userid;
+ }
+
+ public Long getFriendid() {
+ return friendid;
+ }
+
+ public void setFriendid(Long friendid) {
+ this.friendid = friendid;
+ }
+
+ public LocalDateTime getRequesttime() {
+ return requesttime;
+ }
+
+ public void setRequesttime(LocalDateTime requesttime) {
+ this.requesttime = requesttime;
+ }
+
+ public Integer getFriendType() {
+ return friendType;
+ }
+
+ public void setFriendType(Integer friendType) {
+ this.friendType = friendType;
+ }
+
+ public Integer getFriendRight() {
+ return friendRight;
+ }
+
+ public void setFriendRight(Integer friendRight) {
+ this.friendRight = friendRight;
+ }
+
+ @Override
+ public String toString() {
+ return "FriendList{" +
+ "userid = " + userid +
+ ", friendid = " + friendid +
+ ", requesttime = " + requesttime +
+ ", friendType = " + friendType +
+ ", friendRight = " + friendRight +
+ "}";
+ }
+}
diff --git a/src/main/java/com/pt5/pthouduan/entity/FriendsList.java b/src/main/java/com/pt5/pthouduan/entity/FriendsList.java
new file mode 100644
index 0000000..36c164a
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/entity/FriendsList.java
@@ -0,0 +1,94 @@
+package com.pt5.pthouduan.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 用户好友关系列表
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@TableName("friends_list")
+public class FriendsList implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId(value = "relation_id", type = IdType.AUTO)
+ private Long relationId;
+
+ private Long userid;
+
+ private Long friendId;
+
+ private LocalDateTime requestTime;
+
+ private String type;
+
+ private String rightLevel;
+
+ public Long getRelationId() {
+ return relationId;
+ }
+
+ public void setRelationId(Long relationId) {
+ this.relationId = relationId;
+ }
+
+ public Long getUserid() {
+ return userid;
+ }
+
+ public void setUserid(Long userid) {
+ this.userid = userid;
+ }
+
+ public Long getFriendId() {
+ return friendId;
+ }
+
+ public void setFriendId(Long friendId) {
+ this.friendId = friendId;
+ }
+
+ public LocalDateTime getRequestTime() {
+ return requestTime;
+ }
+
+ public void setRequestTime(LocalDateTime requestTime) {
+ this.requestTime = requestTime;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getRightLevel() {
+ return rightLevel;
+ }
+
+ public void setRightLevel(String rightLevel) {
+ this.rightLevel = rightLevel;
+ }
+
+ @Override
+ public String toString() {
+ return "FriendsList{" +
+ "relationId = " + relationId +
+ ", userid = " + userid +
+ ", friendId = " + friendId +
+ ", requestTime = " + requestTime +
+ ", type = " + type +
+ ", rightLevel = " + rightLevel +
+ "}";
+ }
+}
diff --git a/src/main/java/com/pt5/pthouduan/entity/Invites.java b/src/main/java/com/pt5/pthouduan/entity/Invites.java
new file mode 100644
index 0000000..80f37b4
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/entity/Invites.java
@@ -0,0 +1,82 @@
+package com.pt5.pthouduan.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@TableName("invites")
+public class Invites implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId("inviteid")
+ private Long inviteid;
+
+ private Long userid;
+
+ private String invitedUserEmail;
+
+ private String code;
+
+ private Boolean isUsed;
+
+ public Long getInviteid() {
+ return inviteid;
+ }
+
+ public void setInviteid(Long inviteid) {
+ this.inviteid = inviteid;
+ }
+
+ public Long getUserid() {
+ return userid;
+ }
+
+ public void setUserid(Long userid) {
+ this.userid = userid;
+ }
+
+ public String getInvitedUserEmail() {
+ return invitedUserEmail;
+ }
+
+ public void setInvitedUserEmail(String invitedUserEmail) {
+ this.invitedUserEmail = invitedUserEmail;
+ }
+
+ public String getCode() {
+ return code;
+ }
+
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ public Boolean getIsUsed() {
+ return isUsed;
+ }
+
+ public void setIsUsed(Boolean isUsed) {
+ this.isUsed = isUsed;
+ }
+
+ @Override
+ public String toString() {
+ return "Invites{" +
+ "inviteid = " + inviteid +
+ ", userid = " + userid +
+ ", invitedUserEmail = " + invitedUserEmail +
+ ", code = " + code +
+ ", isUsed = " + isUsed +
+ "}";
+ }
+}
diff --git a/src/main/java/com/pt5/pthouduan/entity/Marking.java b/src/main/java/com/pt5/pthouduan/entity/Marking.java
new file mode 100644
index 0000000..e549cab
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/entity/Marking.java
@@ -0,0 +1,69 @@
+package com.pt5.pthouduan.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@TableName("marking")
+public class Marking implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private Long torrentid;
+
+ private Long userid;
+
+ private Integer fiveStarReview;
+
+ private String textualEvaluation;
+
+ public Long getTorrentid() {
+ return torrentid;
+ }
+
+ public void setTorrentid(Long torrentid) {
+ this.torrentid = torrentid;
+ }
+
+ public Long getUserid() {
+ return userid;
+ }
+
+ public void setUserid(Long userid) {
+ this.userid = userid;
+ }
+
+ public Integer getFiveStarReview() {
+ return fiveStarReview;
+ }
+
+ public void setFiveStarReview(Integer fiveStarReview) {
+ this.fiveStarReview = fiveStarReview;
+ }
+
+ public String getTextualEvaluation() {
+ return textualEvaluation;
+ }
+
+ public void setTextualEvaluation(String textualEvaluation) {
+ this.textualEvaluation = textualEvaluation;
+ }
+
+ @Override
+ public String toString() {
+ return "Marking{" +
+ "torrentid = " + torrentid +
+ ", userid = " + userid +
+ ", fiveStarReview = " + fiveStarReview +
+ ", textualEvaluation = " + textualEvaluation +
+ "}";
+ }
+}
diff --git a/src/main/java/com/pt5/pthouduan/entity/Post.java b/src/main/java/com/pt5/pthouduan/entity/Post.java
new file mode 100644
index 0000000..d04a601
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/entity/Post.java
@@ -0,0 +1,94 @@
+package com.pt5.pthouduan.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@TableName("post")
+public class Post implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId("postid")
+ private Integer postid;
+
+ private Long userid;
+
+ private LocalDateTime updatedTime;
+
+ private Boolean isSticky;
+
+ private String postTitle;
+
+ private LocalDateTime postCreatedTime;
+
+ public Integer getPostid() {
+ return postid;
+ }
+
+ public void setPostid(Integer postid) {
+ this.postid = postid;
+ }
+
+ public Long getUserid() {
+ return userid;
+ }
+
+ public void setUserid(Long userid) {
+ this.userid = userid;
+ }
+
+ public LocalDateTime getUpdatedTime() {
+ return updatedTime;
+ }
+
+ public void setUpdatedTime(LocalDateTime updatedTime) {
+ this.updatedTime = updatedTime;
+ }
+
+ public Boolean getIsSticky() {
+ return isSticky;
+ }
+
+ public void setIsSticky(Boolean isSticky) {
+ this.isSticky = isSticky;
+ }
+
+ public String getPostTitle() {
+ return postTitle;
+ }
+
+ public void setPostTitle(String postTitle) {
+ this.postTitle = postTitle;
+ }
+
+ public LocalDateTime getPostCreatedTime() {
+ return postCreatedTime;
+ }
+
+ public void setPostCreatedTime(LocalDateTime postCreatedTime) {
+ this.postCreatedTime = postCreatedTime;
+ }
+
+ @Override
+ public String toString() {
+ return "Post{" +
+ "postid = " + postid +
+ ", userid = " + userid +
+ ", updatedTime = " + updatedTime +
+ ", isSticky = " + isSticky +
+ ", postTitle = " + postTitle +
+ ", postCreatedTime = " + postCreatedTime +
+ "}";
+ }
+}
diff --git a/src/main/java/com/pt5/pthouduan/entity/Promotions.java b/src/main/java/com/pt5/pthouduan/entity/Promotions.java
new file mode 100644
index 0000000..248996f
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/entity/Promotions.java
@@ -0,0 +1,83 @@
+package com.pt5.pthouduan.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@TableName("promotions")
+public class Promotions implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId("promotionid")
+ private Long promotionid;
+
+ private String promotionDescription;
+
+ private Integer promotionType;
+
+ private LocalDateTime startTime;
+
+ private LocalDateTime endTime;
+
+ public Long getPromotionid() {
+ return promotionid;
+ }
+
+ public void setPromotionid(Long promotionid) {
+ this.promotionid = promotionid;
+ }
+
+ public String getPromotionDescription() {
+ return promotionDescription;
+ }
+
+ public void setPromotionDescription(String promotionDescription) {
+ this.promotionDescription = promotionDescription;
+ }
+
+ public Integer getPromotionType() {
+ return promotionType;
+ }
+
+ public void setPromotionType(Integer promotionType) {
+ this.promotionType = promotionType;
+ }
+
+ public LocalDateTime getStartTime() {
+ return startTime;
+ }
+
+ public void setStartTime(LocalDateTime startTime) {
+ this.startTime = startTime;
+ }
+
+ public LocalDateTime getEndTime() {
+ return endTime;
+ }
+
+ public void setEndTime(LocalDateTime endTime) {
+ this.endTime = endTime;
+ }
+
+ @Override
+ public String toString() {
+ return "Promotions{" +
+ "promotionid = " + promotionid +
+ ", promotionDescription = " + promotionDescription +
+ ", promotionType = " + promotionType +
+ ", startTime = " + startTime +
+ ", endTime = " + endTime +
+ "}";
+ }
+}
diff --git a/src/main/java/com/pt5/pthouduan/entity/ResourceAudit.java b/src/main/java/com/pt5/pthouduan/entity/ResourceAudit.java
new file mode 100644
index 0000000..6f6db0a
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/entity/ResourceAudit.java
@@ -0,0 +1,57 @@
+package com.pt5.pthouduan.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@TableName("resource_audit")
+public class ResourceAudit implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private Long userid;
+
+ private Long torrentid;
+
+ private Integer fiveStarResource;
+
+ public Long getUserid() {
+ return userid;
+ }
+
+ public void setUserid(Long userid) {
+ this.userid = userid;
+ }
+
+ public Long getTorrentid() {
+ return torrentid;
+ }
+
+ public void setTorrentid(Long torrentid) {
+ this.torrentid = torrentid;
+ }
+
+ public Integer getFiveStarResource() {
+ return fiveStarResource;
+ }
+
+ public void setFiveStarResource(Integer fiveStarResource) {
+ this.fiveStarResource = fiveStarResource;
+ }
+
+ @Override
+ public String toString() {
+ return "ResourceAudit{" +
+ "userid = " + userid +
+ ", torrentid = " + torrentid +
+ ", fiveStarResource = " + fiveStarResource +
+ "}";
+ }
+}
diff --git a/src/main/java/com/pt5/pthouduan/entity/Torrent.java b/src/main/java/com/pt5/pthouduan/entity/Torrent.java
new file mode 100644
index 0000000..5c85587
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/entity/Torrent.java
@@ -0,0 +1,115 @@
+package com.pt5.pthouduan.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@TableName("torrent")
+public class Torrent implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId("torrentid")
+ private Long torrentid;
+
+ private Long promotionid;
+
+ private Integer categoryid;
+
+ private String infoHash;
+
+ private String torrentTitle;
+
+ private String dpi;
+
+ private String caption;
+
+ private byte[] torrentSize;
+
+ public Long getTorrentid() {
+ return torrentid;
+ }
+
+ public void setTorrentid(Long torrentid) {
+ this.torrentid = torrentid;
+ }
+
+ public Long getPromotionid() {
+ return promotionid;
+ }
+
+ public void setPromotionid(Long promotionid) {
+ this.promotionid = promotionid;
+ }
+
+ public Integer getCategoryid() {
+ return categoryid;
+ }
+
+ public void setCategoryid(Integer categoryid) {
+ this.categoryid = categoryid;
+ }
+
+ public String getInfoHash() {
+ return infoHash;
+ }
+
+ public void setInfoHash(String infoHash) {
+ this.infoHash = infoHash;
+ }
+
+ public String getTorrentTitle() {
+ return torrentTitle;
+ }
+
+ public void setTorrentTitle(String torrentTitle) {
+ this.torrentTitle = torrentTitle;
+ }
+
+ public String getDpi() {
+ return dpi;
+ }
+
+ public void setDpi(String dpi) {
+ this.dpi = dpi;
+ }
+
+ public String getCaption() {
+ return caption;
+ }
+
+ public void setCaption(String caption) {
+ this.caption = caption;
+ }
+
+ public byte[] getTorrentSize() {
+ return torrentSize;
+ }
+
+ public void setTorrentSize(byte[] torrentSize) {
+ this.torrentSize = torrentSize;
+ }
+
+ @Override
+ public String toString() {
+ return "Torrent{" +
+ "torrentid = " + torrentid +
+ ", promotionid = " + promotionid +
+ ", categoryid = " + categoryid +
+ ", infoHash = " + infoHash +
+ ", torrentTitle = " + torrentTitle +
+ ", dpi = " + dpi +
+ ", caption = " + caption +
+ ", torrentSize = " + torrentSize +
+ "}";
+ }
+}
diff --git a/src/main/java/com/pt5/pthouduan/entity/TorrentFiles.java b/src/main/java/com/pt5/pthouduan/entity/TorrentFiles.java
new file mode 100644
index 0000000..4a74430
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/entity/TorrentFiles.java
@@ -0,0 +1,70 @@
+package com.pt5.pthouduan.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@TableName("torrent_files")
+public class TorrentFiles implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId("torrent_fileid")
+ private Integer torrentFileid;
+
+ private Long torrentid;
+
+ private String path;
+
+ private byte[] torrentfileSize;
+
+ public Integer getTorrentFileid() {
+ return torrentFileid;
+ }
+
+ public void setTorrentFileid(Integer torrentFileid) {
+ this.torrentFileid = torrentFileid;
+ }
+
+ public Long getTorrentid() {
+ return torrentid;
+ }
+
+ public void setTorrentid(Long torrentid) {
+ this.torrentid = torrentid;
+ }
+
+ public String getPath() {
+ return path;
+ }
+
+ public void setPath(String path) {
+ this.path = path;
+ }
+
+ public byte[] getTorrentfileSize() {
+ return torrentfileSize;
+ }
+
+ public void setTorrentfileSize(byte[] torrentfileSize) {
+ this.torrentfileSize = torrentfileSize;
+ }
+
+ @Override
+ public String toString() {
+ return "TorrentFiles{" +
+ "torrentFileid = " + torrentFileid +
+ ", torrentid = " + torrentid +
+ ", path = " + path +
+ ", torrentfileSize = " + torrentfileSize +
+ "}";
+ }
+}
diff --git a/src/main/java/com/pt5/pthouduan/entity/User.java b/src/main/java/com/pt5/pthouduan/entity/User.java
new file mode 100644
index 0000000..3a765b8
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/entity/User.java
@@ -0,0 +1,188 @@
+package com.pt5.pthouduan.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@TableName("user")
+public class User implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private String username;
+
+ private String password;
+
+ private Integer userUpload;
+
+ private Long userDownload;
+
+ private Integer credit;
+
+ private String image;
+
+ private String sex;
+
+ @TableId("userid")
+ private Long userid;
+
+ private Integer gradeId;
+
+ private String passkey;
+
+ private LocalDateTime userCreatedTime;
+
+ private Double ratio;
+
+ private Integer age;
+
+ private Integer privacy;
+
+ // 构造函数
+ public User(Long id, String name) {
+ this.userid = id;
+ this.username = name;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public Integer getUserUpload() {
+ return userUpload;
+ }
+
+ public void setUserUpload(Integer userUpload) {
+ this.userUpload = userUpload;
+ }
+
+ public Long getUserDownload() {
+ return userDownload;
+ }
+
+ public void setUserDownload(Long userDownload) {
+ this.userDownload = userDownload;
+ }
+
+ public Integer getCredit() {
+ return credit;
+ }
+
+ public void setCredit(Integer credit) {
+ this.credit = credit;
+ }
+
+ public String getImage() {
+ return image;
+ }
+
+ public void setImage(String image) {
+ this.image = image;
+ }
+
+ public String getSex() {
+ return sex;
+ }
+
+ public void setSex(String sex) {
+ this.sex = sex;
+ }
+
+ public Long getUserid() {
+ return userid;
+ }
+
+ public void setUserid(Long userid) {
+ this.userid = userid;
+ }
+
+ public Integer getGradeId() {
+ return gradeId;
+ }
+
+ public void setGradeId(Integer gradeId) {
+ this.gradeId = gradeId;
+ }
+
+ public String getPasskey() {
+ return passkey;
+ }
+
+ public void setPasskey(String passkey) {
+ this.passkey = passkey;
+ }
+
+ public LocalDateTime getUserCreatedTime() {
+ return userCreatedTime;
+ }
+
+ public void setUserCreatedTime(LocalDateTime userCreatedTime) {
+ this.userCreatedTime = userCreatedTime;
+ }
+
+ public Double getRatio() {
+ return ratio;
+ }
+
+ public void setRatio(Double ratio) {
+ this.ratio = ratio;
+ }
+
+ public Integer getAge() {
+ return age;
+ }
+
+ public void setAge(Integer age) {
+ this.age = age;
+ }
+
+ public Integer getPrivacy() {
+ return privacy;
+ }
+
+ public void setPrivacy(Integer privacy) {
+ this.privacy = privacy;
+ }
+
+ @Override
+ public String toString() {
+ return "User{" +
+ "username = " + username +
+ ", password = " + password +
+ ", userUpload = " + userUpload +
+ ", userDownload = " + userDownload +
+ ", credit = " + credit +
+ ", image = " + image +
+ ", sex = " + sex +
+ ", userid = " + userid +
+ ", gradeId = " + gradeId +
+ ", passkey = " + passkey +
+ ", userCreatedTime = " + userCreatedTime +
+ ", ratio = " + ratio +
+ ", age = " + age +
+ ", privacy = " + privacy +
+ "}";
+ }
+}
diff --git a/src/main/java/com/pt5/pthouduan/entity/UserGrade.java b/src/main/java/com/pt5/pthouduan/entity/UserGrade.java
new file mode 100644
index 0000000..0b8c176
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/entity/UserGrade.java
@@ -0,0 +1,81 @@
+package com.pt5.pthouduan.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@TableName("user_grade")
+public class UserGrade implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId("grade_id")
+ private Integer gradeId;
+
+ private String gradeName;
+
+ private Double minRatio;
+
+ private Integer gradetype;
+
+ private Integer privilege;
+
+ public Integer getGradeId() {
+ return gradeId;
+ }
+
+ public void setGradeId(Integer gradeId) {
+ this.gradeId = gradeId;
+ }
+
+ public String getGradeName() {
+ return gradeName;
+ }
+
+ public void setGradeName(String gradeName) {
+ this.gradeName = gradeName;
+ }
+
+ public Double getMinRatio() {
+ return minRatio;
+ }
+
+ public void setMinRatio(Double minRatio) {
+ this.minRatio = minRatio;
+ }
+
+ public Integer getGradetype() {
+ return gradetype;
+ }
+
+ public void setGradetype(Integer gradetype) {
+ this.gradetype = gradetype;
+ }
+
+ public Integer getPrivilege() {
+ return privilege;
+ }
+
+ public void setPrivilege(Integer privilege) {
+ this.privilege = privilege;
+ }
+
+ @Override
+ public String toString() {
+ return "UserGrade{" +
+ "gradeId = " + gradeId +
+ ", gradeName = " + gradeName +
+ ", minRatio = " + minRatio +
+ ", gradetype = " + gradetype +
+ ", privilege = " + privilege +
+ "}";
+ }
+}
diff --git a/src/main/java/com/pt5/pthouduan/entity/UserTorrents.java b/src/main/java/com/pt5/pthouduan/entity/UserTorrents.java
new file mode 100644
index 0000000..694acb5
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/entity/UserTorrents.java
@@ -0,0 +1,127 @@
+package com.pt5.pthouduan.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ *
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@TableName("user_torrents")
+public class UserTorrents implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableId("userid")
+ private Long userid;
+
+ // @TableId("torrentid")
+ private Long torrentid;
+
+ private Long uploaded;
+
+ private Long remaining;
+
+ private Boolean isSeeder;
+
+ private Boolean isLeecher;
+
+ private Boolean completed;
+
+ private LocalDateTime lastAction;
+
+ private Long userTorrentDownload;
+
+ public Long getUserid() {
+ return userid;
+ }
+
+ public void setUserid(Long userid) {
+ this.userid = userid;
+ }
+
+ public Long getTorrentid() {
+ return torrentid;
+ }
+
+ public void setTorrentid(Long torrentid) {
+ this.torrentid = torrentid;
+ }
+
+ public Long getUploaded() {
+ return uploaded;
+ }
+
+ public void setUploaded(Long uploaded) {
+ this.uploaded = uploaded;
+ }
+
+ public Long getRemaining() {
+ return remaining;
+ }
+
+ public void setRemaining(Long remaining) {
+ this.remaining = remaining;
+ }
+
+ public Boolean getIsSeeder() {
+ return isSeeder;
+ }
+
+ public void setIsSeeder(Boolean isSeeder) {
+ this.isSeeder = isSeeder;
+ }
+
+ public Boolean getIsLeecher() {
+ return isLeecher;
+ }
+
+ public void setIsLeecher(Boolean isLeecher) {
+ this.isLeecher = isLeecher;
+ }
+
+ public Boolean getCompleted() {
+ return completed;
+ }
+
+ public void setCompleted(Boolean completed) {
+ this.completed = completed;
+ }
+
+ public LocalDateTime getLastAction() {
+ return lastAction;
+ }
+
+ public void setLastAction(LocalDateTime lastAction) {
+ this.lastAction = lastAction;
+ }
+
+ public Long getUserTorrentDownload() {
+ return userTorrentDownload;
+ }
+
+ public void setUserTorrentDownload(Long userTorrentDownload) {
+ this.userTorrentDownload = userTorrentDownload;
+ }
+
+ @Override
+ public String toString() {
+ return "UserTorrents{" +
+ "userid = " + userid +
+ ", torrentid = " + torrentid +
+ ", uploaded = " + uploaded +
+ ", remaining = " + remaining +
+ ", isSeeder = " + isSeeder +
+ ", isLeecher = " + isLeecher +
+ ", completed = " + completed +
+ ", lastAction = " + lastAction +
+ ", userTorrentDownload = " + userTorrentDownload +
+ "}";
+ }
+}
diff --git a/src/main/java/com/pt5/pthouduan/mapper/CategoryMapper.java b/src/main/java/com/pt5/pthouduan/mapper/CategoryMapper.java
new file mode 100644
index 0000000..fac2a81
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/CategoryMapper.java
@@ -0,0 +1,18 @@
+package com.pt5.pthouduan.mapper;
+
+import com.pt5.pthouduan.entity.Category;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * Mapper 接口
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@Mapper
+public interface CategoryMapper extends BaseMapper<Category> {
+
+}
diff --git a/src/main/java/com/pt5/pthouduan/mapper/ChatInformationMapper.java b/src/main/java/com/pt5/pthouduan/mapper/ChatInformationMapper.java
new file mode 100644
index 0000000..f410562
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/ChatInformationMapper.java
@@ -0,0 +1,18 @@
+package com.pt5.pthouduan.mapper;
+
+import com.pt5.pthouduan.entity.ChatInformation;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * Mapper 接口
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@Mapper
+public interface ChatInformationMapper extends BaseMapper<ChatInformation> {
+
+}
diff --git a/src/main/java/com/pt5/pthouduan/mapper/CommentMapper.java b/src/main/java/com/pt5/pthouduan/mapper/CommentMapper.java
new file mode 100644
index 0000000..755a2b5
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/CommentMapper.java
@@ -0,0 +1,18 @@
+package com.pt5.pthouduan.mapper;
+
+import com.pt5.pthouduan.entity.Comment;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * Mapper 接口
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@Mapper
+public interface CommentMapper extends BaseMapper<Comment> {
+
+}
diff --git a/src/main/java/com/pt5/pthouduan/mapper/FollowerMapper.java b/src/main/java/com/pt5/pthouduan/mapper/FollowerMapper.java
new file mode 100644
index 0000000..f748871
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/FollowerMapper.java
@@ -0,0 +1,18 @@
+package com.pt5.pthouduan.mapper;
+
+import com.pt5.pthouduan.entity.Follower;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * Mapper 接口
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@Mapper
+public interface FollowerMapper extends BaseMapper<Follower> {
+
+}
diff --git a/src/main/java/com/pt5/pthouduan/mapper/FriendListMapper.java b/src/main/java/com/pt5/pthouduan/mapper/FriendListMapper.java
new file mode 100644
index 0000000..f2a9863
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/FriendListMapper.java
@@ -0,0 +1,18 @@
+package com.pt5.pthouduan.mapper;
+
+import com.pt5.pthouduan.entity.FriendList;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * Mapper 接口
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@Mapper
+public interface FriendListMapper extends BaseMapper<FriendList> {
+
+}
diff --git a/src/main/java/com/pt5/pthouduan/mapper/FriendsListMapper.java b/src/main/java/com/pt5/pthouduan/mapper/FriendsListMapper.java
new file mode 100644
index 0000000..a6d5b56
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/FriendsListMapper.java
@@ -0,0 +1,18 @@
+package com.pt5.pthouduan.mapper;
+
+import com.pt5.pthouduan.entity.FriendsList;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * 用户好友关系列表 Mapper 接口
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@Mapper
+public interface FriendsListMapper extends BaseMapper<FriendsList> {
+
+}
diff --git a/src/main/java/com/pt5/pthouduan/mapper/InvitesMapper.java b/src/main/java/com/pt5/pthouduan/mapper/InvitesMapper.java
new file mode 100644
index 0000000..6cc278b
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/InvitesMapper.java
@@ -0,0 +1,18 @@
+package com.pt5.pthouduan.mapper;
+
+import com.pt5.pthouduan.entity.Invites;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * Mapper 接口
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@Mapper
+public interface InvitesMapper extends BaseMapper<Invites> {
+
+}
diff --git a/src/main/java/com/pt5/pthouduan/mapper/MarkingMapper.java b/src/main/java/com/pt5/pthouduan/mapper/MarkingMapper.java
new file mode 100644
index 0000000..69b5f92
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/MarkingMapper.java
@@ -0,0 +1,18 @@
+package com.pt5.pthouduan.mapper;
+
+import com.pt5.pthouduan.entity.Marking;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * Mapper 接口
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@Mapper
+public interface MarkingMapper extends BaseMapper<Marking> {
+
+}
diff --git a/src/main/java/com/pt5/pthouduan/mapper/PostMapper.java b/src/main/java/com/pt5/pthouduan/mapper/PostMapper.java
new file mode 100644
index 0000000..817e555
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/PostMapper.java
@@ -0,0 +1,18 @@
+package com.pt5.pthouduan.mapper;
+
+import com.pt5.pthouduan.entity.Post;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * Mapper 接口
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@Mapper
+public interface PostMapper extends BaseMapper<Post> {
+
+}
diff --git a/src/main/java/com/pt5/pthouduan/mapper/PromotionsMapper.java b/src/main/java/com/pt5/pthouduan/mapper/PromotionsMapper.java
new file mode 100644
index 0000000..c69109c
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/PromotionsMapper.java
@@ -0,0 +1,18 @@
+package com.pt5.pthouduan.mapper;
+
+import com.pt5.pthouduan.entity.Promotions;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * Mapper 接口
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@Mapper
+public interface PromotionsMapper extends BaseMapper<Promotions> {
+
+}
diff --git a/src/main/java/com/pt5/pthouduan/mapper/ResourceAuditMapper.java b/src/main/java/com/pt5/pthouduan/mapper/ResourceAuditMapper.java
new file mode 100644
index 0000000..30ebc3f
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/ResourceAuditMapper.java
@@ -0,0 +1,18 @@
+package com.pt5.pthouduan.mapper;
+
+import com.pt5.pthouduan.entity.ResourceAudit;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * Mapper 接口
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@Mapper
+public interface ResourceAuditMapper extends BaseMapper<ResourceAudit> {
+
+}
diff --git a/src/main/java/com/pt5/pthouduan/mapper/TorrentFilesMapper.java b/src/main/java/com/pt5/pthouduan/mapper/TorrentFilesMapper.java
new file mode 100644
index 0000000..f1ed305
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/TorrentFilesMapper.java
@@ -0,0 +1,18 @@
+package com.pt5.pthouduan.mapper;
+
+import com.pt5.pthouduan.entity.TorrentFiles;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * Mapper 接口
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@Mapper
+public interface TorrentFilesMapper extends BaseMapper<TorrentFiles> {
+
+}
diff --git a/src/main/java/com/pt5/pthouduan/mapper/TorrentMapper.java b/src/main/java/com/pt5/pthouduan/mapper/TorrentMapper.java
new file mode 100644
index 0000000..9c7b608
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/TorrentMapper.java
@@ -0,0 +1,18 @@
+package com.pt5.pthouduan.mapper;
+
+import com.pt5.pthouduan.entity.Torrent;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * Mapper 接口
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@Mapper
+public interface TorrentMapper extends BaseMapper<Torrent> {
+
+}
diff --git a/src/main/java/com/pt5/pthouduan/mapper/UserGradeMapper.java b/src/main/java/com/pt5/pthouduan/mapper/UserGradeMapper.java
new file mode 100644
index 0000000..aebef5a
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/UserGradeMapper.java
@@ -0,0 +1,18 @@
+package com.pt5.pthouduan.mapper;
+
+import com.pt5.pthouduan.entity.UserGrade;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * Mapper 接口
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@Mapper
+public interface UserGradeMapper extends BaseMapper<UserGrade> {
+
+}
diff --git a/src/main/java/com/pt5/pthouduan/mapper/UserMapper.java b/src/main/java/com/pt5/pthouduan/mapper/UserMapper.java
new file mode 100644
index 0000000..8a250f0
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/UserMapper.java
@@ -0,0 +1,18 @@
+package com.pt5.pthouduan.mapper;
+
+import com.pt5.pthouduan.entity.User;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * Mapper 接口
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@Mapper
+public interface UserMapper extends BaseMapper<User> {
+
+}
diff --git a/src/main/java/com/pt5/pthouduan/mapper/UserTorrentsMapper.java b/src/main/java/com/pt5/pthouduan/mapper/UserTorrentsMapper.java
new file mode 100644
index 0000000..3137e03
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/UserTorrentsMapper.java
@@ -0,0 +1,18 @@
+package com.pt5.pthouduan.mapper;
+
+import com.pt5.pthouduan.entity.UserTorrents;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ * Mapper 接口
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@Mapper
+public interface UserTorrentsMapper extends BaseMapper<UserTorrents> {
+
+}
diff --git a/src/main/java/com/pt5/pthouduan/mapper/xml/CategoryMapper.xml b/src/main/java/com/pt5/pthouduan/mapper/xml/CategoryMapper.xml
new file mode 100644
index 0000000..8b2f365
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/xml/CategoryMapper.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.pt5.pthouduan.mapper.CategoryMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="BaseResultMap" type="com.pt5.pthouduan.entity.Category">
+ <id column="categoryid" property="categoryid" />
+ <result column="categorytype" property="categorytype" />
+ <result column="category_name" property="categoryName" />
+ </resultMap>
+
+ <!-- 通用查询结果列 -->
+ <sql id="Base_Column_List">
+ categoryid, categorytype, category_name
+ </sql>
+
+</mapper>
diff --git a/src/main/java/com/pt5/pthouduan/mapper/xml/ChatInformationMapper.xml b/src/main/java/com/pt5/pthouduan/mapper/xml/ChatInformationMapper.xml
new file mode 100644
index 0000000..5c4b784
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/xml/ChatInformationMapper.xml
@@ -0,0 +1,16 @@
+<?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.pt5.pthouduan.mapper.ChatInformationMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="BaseResultMap" type="com.pt5.pthouduan.entity.ChatInformation">
+ <result column="userid" property="userid" />
+ <result column="chatimformation" property="chatimformation" />
+ </resultMap>
+
+ <!-- 通用查询结果列 -->
+ <sql id="Base_Column_List">
+ userid, chatimformation
+ </sql>
+
+</mapper>
diff --git a/src/main/java/com/pt5/pthouduan/mapper/xml/CommentMapper.xml b/src/main/java/com/pt5/pthouduan/mapper/xml/CommentMapper.xml
new file mode 100644
index 0000000..6dcbe17
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/xml/CommentMapper.xml
@@ -0,0 +1,18 @@
+<?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.pt5.pthouduan.mapper.CommentMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="BaseResultMap" type="com.pt5.pthouduan.entity.Comment">
+ <id column="commentid" property="commentid" />
+ <result column="postid" property="postid" />
+ <result column="post_commentcontent" property="postCommentcontent" />
+ <result column="commenttime" property="commenttime" />
+ </resultMap>
+
+ <!-- 通用查询结果列 -->
+ <sql id="Base_Column_List">
+ commentid, postid, post_commentcontent, commenttime
+ </sql>
+
+</mapper>
diff --git a/src/main/java/com/pt5/pthouduan/mapper/xml/FollowerMapper.xml b/src/main/java/com/pt5/pthouduan/mapper/xml/FollowerMapper.xml
new file mode 100644
index 0000000..bf7987f
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/xml/FollowerMapper.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.pt5.pthouduan.mapper.FollowerMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="BaseResultMap" type="com.pt5.pthouduan.entity.Follower">
+ <id column="userid" property="userid" />
+ <id column="Use_userid" property="useUserid" />
+ <result column="followstarttime" property="followstarttime" />
+ </resultMap>
+
+ <!-- 通用查询结果列 -->
+ <sql id="Base_Column_List">
+ userid, Use_userid, followstarttime
+ </sql>
+
+</mapper>
diff --git a/src/main/java/com/pt5/pthouduan/mapper/xml/FriendListMapper.xml b/src/main/java/com/pt5/pthouduan/mapper/xml/FriendListMapper.xml
new file mode 100644
index 0000000..225fd54
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/xml/FriendListMapper.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.pt5.pthouduan.mapper.FriendListMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="BaseResultMap" type="com.pt5.pthouduan.entity.FriendList">
+ <result column="userid" property="userid" />
+ <result column="friendid" property="friendid" />
+ <result column="requesttime" property="requesttime" />
+ <result column="friend_type" property="friendType" />
+ <result column="friend_right" property="friendRight" />
+ </resultMap>
+
+ <!-- 通用查询结果列 -->
+ <sql id="Base_Column_List">
+ userid, friendid, requesttime, friend_type, friend_right
+ </sql>
+
+</mapper>
diff --git a/src/main/java/com/pt5/pthouduan/mapper/xml/FriendsListMapper.xml b/src/main/java/com/pt5/pthouduan/mapper/xml/FriendsListMapper.xml
new file mode 100644
index 0000000..6d8ff4b
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/xml/FriendsListMapper.xml
@@ -0,0 +1,20 @@
+<?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.pt5.pthouduan.mapper.FriendsListMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="BaseResultMap" type="com.pt5.pthouduan.entity.FriendsList">
+ <id column="relation_id" property="relationId" />
+ <result column="userid" property="userid" />
+ <result column="friend_id" property="friendId" />
+ <result column="request_time" property="requestTime" />
+ <result column="type" property="type" />
+ <result column="right_level" property="rightLevel" />
+ </resultMap>
+
+ <!-- 通用查询结果列 -->
+ <sql id="Base_Column_List">
+ relation_id, userid, friend_id, request_time, type, right_level
+ </sql>
+
+</mapper>
diff --git a/src/main/java/com/pt5/pthouduan/mapper/xml/InvitesMapper.xml b/src/main/java/com/pt5/pthouduan/mapper/xml/InvitesMapper.xml
new file mode 100644
index 0000000..3f94012
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/xml/InvitesMapper.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.pt5.pthouduan.mapper.InvitesMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="BaseResultMap" type="com.pt5.pthouduan.entity.Invites">
+ <id column="inviteid" property="inviteid" />
+ <result column="userid" property="userid" />
+ <result column="invited_user_email" property="invitedUserEmail" />
+ <result column="code" property="code" />
+ <result column="is_used" property="isUsed" />
+ </resultMap>
+
+ <!-- 通用查询结果列 -->
+ <sql id="Base_Column_List">
+ inviteid, userid, invited_user_email, code, is_used
+ </sql>
+
+</mapper>
diff --git a/src/main/java/com/pt5/pthouduan/mapper/xml/MarkingMapper.xml b/src/main/java/com/pt5/pthouduan/mapper/xml/MarkingMapper.xml
new file mode 100644
index 0000000..9730285
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/xml/MarkingMapper.xml
@@ -0,0 +1,18 @@
+<?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.pt5.pthouduan.mapper.MarkingMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="BaseResultMap" type="com.pt5.pthouduan.entity.Marking">
+ <result column="torrentid" property="torrentid" />
+ <result column="userid" property="userid" />
+ <result column="Five_star_review" property="fiveStarReview" />
+ <result column="textual_evaluation" property="textualEvaluation" />
+ </resultMap>
+
+ <!-- 通用查询结果列 -->
+ <sql id="Base_Column_List">
+ torrentid, userid, Five_star_review, textual_evaluation
+ </sql>
+
+</mapper>
diff --git a/src/main/java/com/pt5/pthouduan/mapper/xml/PostMapper.xml b/src/main/java/com/pt5/pthouduan/mapper/xml/PostMapper.xml
new file mode 100644
index 0000000..2c61be7
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/xml/PostMapper.xml
@@ -0,0 +1,20 @@
+<?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.pt5.pthouduan.mapper.PostMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="BaseResultMap" type="com.pt5.pthouduan.entity.Post">
+ <id column="postid" property="postid" />
+ <result column="userid" property="userid" />
+ <result column="updated_time" property="updatedTime" />
+ <result column="is_sticky" property="isSticky" />
+ <result column="post_title" property="postTitle" />
+ <result column="post_created_time" property="postCreatedTime" />
+ </resultMap>
+
+ <!-- 通用查询结果列 -->
+ <sql id="Base_Column_List">
+ postid, userid, updated_time, is_sticky, post_title, post_created_time
+ </sql>
+
+</mapper>
diff --git a/src/main/java/com/pt5/pthouduan/mapper/xml/PromotionsMapper.xml b/src/main/java/com/pt5/pthouduan/mapper/xml/PromotionsMapper.xml
new file mode 100644
index 0000000..7fe626d
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/xml/PromotionsMapper.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.pt5.pthouduan.mapper.PromotionsMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="BaseResultMap" type="com.pt5.pthouduan.entity.Promotions">
+ <id column="promotionid" property="promotionid" />
+ <result column="promotion_description" property="promotionDescription" />
+ <result column="promotion_type" property="promotionType" />
+ <result column="start_time" property="startTime" />
+ <result column="end_time" property="endTime" />
+ </resultMap>
+
+ <!-- 通用查询结果列 -->
+ <sql id="Base_Column_List">
+ promotionid, promotion_description, promotion_type, start_time, end_time
+ </sql>
+
+</mapper>
diff --git a/src/main/java/com/pt5/pthouduan/mapper/xml/ResourceAuditMapper.xml b/src/main/java/com/pt5/pthouduan/mapper/xml/ResourceAuditMapper.xml
new file mode 100644
index 0000000..945d232
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/xml/ResourceAuditMapper.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.pt5.pthouduan.mapper.ResourceAuditMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="BaseResultMap" type="com.pt5.pthouduan.entity.ResourceAudit">
+ <result column="userid" property="userid" />
+ <result column="torrentid" property="torrentid" />
+ <result column="five_star_resource" property="fiveStarResource" />
+ </resultMap>
+
+ <!-- 通用查询结果列 -->
+ <sql id="Base_Column_List">
+ userid, torrentid, five_star_resource
+ </sql>
+
+</mapper>
diff --git a/src/main/java/com/pt5/pthouduan/mapper/xml/TorrentFilesMapper.xml b/src/main/java/com/pt5/pthouduan/mapper/xml/TorrentFilesMapper.xml
new file mode 100644
index 0000000..8a59d7e
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/xml/TorrentFilesMapper.xml
@@ -0,0 +1,18 @@
+<?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.pt5.pthouduan.mapper.TorrentFilesMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="BaseResultMap" type="com.pt5.pthouduan.entity.TorrentFiles">
+ <id column="torrent_fileid" property="torrentFileid" />
+ <result column="torrentid" property="torrentid" />
+ <result column="path" property="path" />
+ <result column="torrentfile_size" property="torrentfileSize" />
+ </resultMap>
+
+ <!-- 通用查询结果列 -->
+ <sql id="Base_Column_List">
+ torrent_fileid, torrentid, path, torrentfile_size
+ </sql>
+
+</mapper>
diff --git a/src/main/java/com/pt5/pthouduan/mapper/xml/TorrentMapper.xml b/src/main/java/com/pt5/pthouduan/mapper/xml/TorrentMapper.xml
new file mode 100644
index 0000000..0b6a643
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/xml/TorrentMapper.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.pt5.pthouduan.mapper.TorrentMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="BaseResultMap" type="com.pt5.pthouduan.entity.Torrent">
+ <id column="torrentid" property="torrentid" />
+ <result column="promotionid" property="promotionid" />
+ <result column="categoryid" property="categoryid" />
+ <result column="info_hash" property="infoHash" />
+ <result column="torrent_title" property="torrentTitle" />
+ <result column="dpi" property="dpi" />
+ <result column="caption" property="caption" />
+ <result column="torrent_size" property="torrentSize" />
+ </resultMap>
+
+ <!-- 通用查询结果列 -->
+ <sql id="Base_Column_List">
+ torrentid, promotionid, categoryid, info_hash, torrent_title, dpi, caption, torrent_size
+ </sql>
+
+</mapper>
diff --git a/src/main/java/com/pt5/pthouduan/mapper/xml/UserGradeMapper.xml b/src/main/java/com/pt5/pthouduan/mapper/xml/UserGradeMapper.xml
new file mode 100644
index 0000000..a379c44
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/xml/UserGradeMapper.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.pt5.pthouduan.mapper.UserGradeMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="BaseResultMap" type="com.pt5.pthouduan.entity.UserGrade">
+ <id column="grade_id" property="gradeId" />
+ <result column="grade_name" property="gradeName" />
+ <result column="min_ratio" property="minRatio" />
+ <result column="gradetype" property="gradetype" />
+ <result column="privilege" property="privilege" />
+ </resultMap>
+
+ <!-- 通用查询结果列 -->
+ <sql id="Base_Column_List">
+ grade_id, grade_name, min_ratio, gradetype, privilege
+ </sql>
+
+</mapper>
diff --git a/src/main/java/com/pt5/pthouduan/mapper/xml/UserMapper.xml b/src/main/java/com/pt5/pthouduan/mapper/xml/UserMapper.xml
new file mode 100644
index 0000000..32d22ca
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/xml/UserMapper.xml
@@ -0,0 +1,28 @@
+<?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.pt5.pthouduan.mapper.UserMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="BaseResultMap" type="com.pt5.pthouduan.entity.User">
+ <id column="userid" property="userid" />
+ <result column="username" property="username" />
+ <result column="password" property="password" />
+ <result column="user_upload" property="userUpload" />
+ <result column="user_download" property="userDownload" />
+ <result column="credit" property="credit" />
+ <result column="image" property="image" />
+ <result column="sex" property="sex" />
+ <result column="grade_id" property="gradeId" />
+ <result column="passkey" property="passkey" />
+ <result column="user_created_time" property="userCreatedTime" />
+ <result column="ratio" property="ratio" />
+ <result column="age" property="age" />
+ <result column="privacy" property="privacy" />
+ </resultMap>
+
+ <!-- 通用查询结果列 -->
+ <sql id="Base_Column_List">
+ username, password, user_upload, user_download, credit, image, sex, userid, grade_id, passkey, user_created_time, ratio, age, privacy
+ </sql>
+
+</mapper>
diff --git a/src/main/java/com/pt5/pthouduan/mapper/xml/UserTorrentsMapper.xml b/src/main/java/com/pt5/pthouduan/mapper/xml/UserTorrentsMapper.xml
new file mode 100644
index 0000000..8884dcc
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/mapper/xml/UserTorrentsMapper.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.pt5.pthouduan.mapper.UserTorrentsMapper">
+
+ <!-- 通用查询映射结果 -->
+ <resultMap id="BaseResultMap" type="com.pt5.pthouduan.entity.UserTorrents">
+ <id column="userid" property="userid" />
+ <id column="torrentid" property="torrentid" />
+ <result column="uploaded" property="uploaded" />
+ <result column="remaining" property="remaining" />
+ <result column="is_seeder" property="isSeeder" />
+ <result column="is_leecher" property="isLeecher" />
+ <result column="completed" property="completed" />
+ <result column="last_action" property="lastAction" />
+ <result column="user_torrent_download" property="userTorrentDownload" />
+ </resultMap>
+
+ <!-- 通用查询结果列 -->
+ <sql id="Base_Column_List">
+ userid, torrentid, uploaded, remaining, is_seeder, is_leecher, completed, last_action, user_torrent_download
+ </sql>
+
+</mapper>
diff --git a/src/main/java/com/pt5/pthouduan/service/UserService.java b/src/main/java/com/pt5/pthouduan/service/UserService.java
new file mode 100644
index 0000000..1a14ad1
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/service/UserService.java
@@ -0,0 +1,20 @@
+package com.pt5.pthouduan.service;
+
+import com.pt5.pthouduan.entity.User;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 服务类
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+public interface UserService{
+ // 根据ID获取用户
+ // 创建用户
+ User createUser(User user);
+
+
+}
diff --git a/src/main/java/com/pt5/pthouduan/service/impl/UserServiceImpl.java b/src/main/java/com/pt5/pthouduan/service/impl/UserServiceImpl.java
new file mode 100644
index 0000000..4811fe5
--- /dev/null
+++ b/src/main/java/com/pt5/pthouduan/service/impl/UserServiceImpl.java
@@ -0,0 +1,26 @@
+package com.pt5.pthouduan.service.impl;
+
+import com.pt5.pthouduan.entity.User;
+import com.pt5.pthouduan.mapper.UserMapper;
+import com.pt5.pthouduan.service.UserService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 服务实现类
+ * </p>
+ *
+ * @author ljx
+ * @since 2025-04-14
+ */
+@Service
+public class UserServiceImpl implements UserService {
+ @Override
+ public User createUser(User user) {
+ // 模拟创建用户
+ return user;
+ }
+
+
+}
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
new file mode 100644
index 0000000..e8d6bd9
--- /dev/null
+++ b/src/main/resources/application.properties
@@ -0,0 +1,14 @@
+spring.application.name=PT-houduan
+spring.datasource.url=jdbc:mysql://localhost:3306/pt?useSSL=false&serverTimezone=Asia/Shanghai
+spring.datasource.username=root
+spring.datasource.password=12345
+spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
+
+# MyBatis-Plus ??
+mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
+mybatis-plus.global-config.db-config.id-type=auto
+mybatis-plus.global-config.db-config.logic-delete-value=1
+mybatis-plus.global-config.db-config.logic-not-delete-value=0
+mybatis-plus.mapper-locations=classpath:/mapper/*.xml
+mybatis-plus.type-aliases-package=com.pt5.pthouduan.entity
+
diff --git a/src/test/java/com/pt5/pthouduan/PtHouduanApplicationTests.java b/src/test/java/com/pt5/pthouduan/PtHouduanApplicationTests.java
new file mode 100644
index 0000000..92e3cae
--- /dev/null
+++ b/src/test/java/com/pt5/pthouduan/PtHouduanApplicationTests.java
@@ -0,0 +1,16 @@
+package com.pt5.pthouduan;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+@SpringBootTest
+//@SpringBootTest(properties = "spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration")
+class PtHouduanApplicationTests {
+
+ @Test
+ void contextLoads() {
+ //增加一行注释
+ //确定增加
+ }
+
+}
diff --git a/src/test/resources/application.yml b/src/test/resources/application.yml
new file mode 100644
index 0000000..9d0257e
--- /dev/null
+++ b/src/test/resources/application.yml
@@ -0,0 +1,11 @@
+spring:
+ datasource:
+ url: jdbc:h2:mem:testdb
+ driver-class-name: org.h2.Driver
+ username: sa
+ password:
+ jpa:
+ hibernate:
+ ddl-auto: none
+ show-sql: false
+ database-platform: org.hibernate.dialect.H2Dialect