diff --git a/.env.docker b/.env.docker
new file mode 100644
index 0000000..d1b6c58
--- /dev/null
+++ b/.env.docker
@@ -0,0 +1,13 @@
+POSTGRES_USER=postgres
+POSTGRES_PASSWORD=123456
+ZFGBB_DATABASE=zfgc_dev
+ZFGBB_USER=zfgbb_user
+ZFGBB_USER_PASSWORD=123456
+
+SPRING_DATASOURCE_URL=jdbc:postgresql://host.docker.internal:5432/zfgc_dev
+SPRING_DATASOURCE_USERNAME=zfgbb_user
+SPRING_DATASOURCE_PASSWORD=123456
+
+mbg_jdbc_url=jdbc:postgresql://host.docker.internal:5432/zfgc_dev
+mbg_jdbc_username=zfgbb_user
+mbg_jdbc_password=123456
\ No newline at end of file
diff --git a/.env.local b/.env.local
new file mode 100644
index 0000000..8723759
--- /dev/null
+++ b/.env.local
@@ -0,0 +1,13 @@
+POSTGRES_USER=postgres
+POSTGRES_PASSWORD=123456
+ZFGBB_DATABASE=zfgc_dev
+ZFGBB_USER=zfgbb_user
+ZFGBB_USER_PASSWORD=123456
+
+SPRING_DATASOURCE_URL=jdbc:postgresql://localhost:5432/zfgc_dev
+SPRING_DATASOURCE_USERNAME=zfgbb_user
+SPRING_DATASOURCE_PASSWORD=123456
+
+mbg_jdbc_url=jdbc:postgresql://localhost:5432/zfgc_dev
+mbg_jdbc_username=zfgbb_user
+mbg_jdbc_password=123456
\ No newline at end of file
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..0652657
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+*.sh text eol=lf
\ No newline at end of file
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..8f40fb9
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,11 @@
+# To get started with Dependabot version updates, you'll need to specify which
+# package ecosystems to update and where the package manifests are located.
+# Please see the documentation for all configuration options:
+# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
+
+version: 2
+updates:
+ - package-ecosystem: "maven" # See documentation for possible values
+ directory: "/" # Location of package manifests
+ schedule:
+ interval: "weekly"
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..00c2423
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,20 @@
+name: CI
+on:
+ pull_request:
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ java-version: [17]
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up JDK ${{ matrix.java-version}} for x64
+ uses: actions/setup-java@v4
+ with:
+ java-version: ${{ matrix.java-version }}
+ distribution: 'temurin'
+ architecture: x64
+ cache: maven
+ - name: Build with Maven
+ run: mvn clean compile package -Dmaven.test.skip=true
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 549e00a..0ebe513 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,33 +1,31 @@
-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/
+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/
+.env
diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties
index b7cb93e..e47ac85 100644
--- a/.mvn/wrapper/maven-wrapper.properties
+++ b/.mvn/wrapper/maven-wrapper.properties
@@ -1,2 +1,2 @@
-distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip
-wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip
+wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
new file mode 100644
index 0000000..158a851
--- /dev/null
+++ b/.vscode/extensions.json
@@ -0,0 +1,5 @@
+{
+ "recommendations": [
+ "vscjava.vscode-java-pack"
+ ]
+}
\ No newline at end of file
diff --git a/.vscode/launch.json b/.vscode/launch.json
new file mode 100644
index 0000000..9e40f7e
--- /dev/null
+++ b/.vscode/launch.json
@@ -0,0 +1,16 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "type": "java",
+ "name": "Debug Backend",
+ "request": "launch",
+ "mainClass": "com.zfgc.zfgbb.ZfgbbApplication",
+ "projectName": "zfgbb",
+ "envFile": "${workspaceFolder}/.env.local"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..25d5063
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,4 @@
+{
+ "java.configuration.updateBuildConfiguration": "interactive",
+ "java.compile.nullAnalysis.mode": "automatic"
+}
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..d365a95
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,24 @@
+FROM maven:3.9-eclipse-temurin-17 AS build
+
+RUN mkdir -p /usr/src/zfgbb
+ADD . /usr/src/zfgbb
+
+WORKDIR /usr/src/zfgbb
+
+RUN mvn clean compile package -Dmaven.test.skip=true
+
+# FIXME: This image should be switched to gcr.io/distroless/java-base-debian12 because it is much smaller. For now, this will work.
+FROM tomcat:jre17-temurin-jammy AS deploy
+
+COPY --from=build /usr/src/zfgbb/target/*.war /usr/local/tomcat/webapps/
+
+EXPOSE ${ZFGBB_BACKEND_PORT:-8080}
+
+CMD ["catalina.sh", "run"]
+
+FROM postgres:16 AS database
+
+ADD ./scripts/sql/provisioning/1-zfgbb.initialize-database.sh /docker-entrypoint-initdb.d/1-zfgbb.initialize-database.sh
+
+# We exclude .sql from the file name so that it gets ignored by the init script.
+ADD ./scripts/sql/provisioning/2-provision-database.sql /docker-entrypoint-initdb.d/2-provision-database
\ No newline at end of file
diff --git a/LICENSE b/LICENSE
index 02ba68f..04c1550 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,21 +1,21 @@
-MIT License
-
-Copyright (c) 2022 ZFGC
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+MIT License
+
+Copyright (c) 2022 ZFGC
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
index e89885d..1a68e49 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,88 @@
-Java 17
-maven clean install -Dmaven.test.skip=true
\ No newline at end of file
+# ZFGBB Backend
+
+Bringin back the Drama Llama from the dead!
+
+[![CI](https://github.com/ZFGCCP/ZFGCBB/actions/workflows/ci.yml/badge.svg)](https://github.com/ZFGCCP/ZFGCBB/actions/workflows/ci.yml)
+
+## Table of Contents
+
+- [ZFGBB Backend](#zfgbb-backend)
+ - [Table of Contents](#table-of-contents)
+ - [Getting Started](#getting-started)
+ - [Prerequisites](#prerequisites)
+ - [Docker](#docker)
+ - [Standing up just the database](#standing-up-just-the-database)
+ - [Developing](#developing)
+ - [Building](#building)
+ - [Running Tests](#running-tests)
+ - [Running MyBatis Generator](#running-mybatis-generator)
+ - [License](#license)
+
+## Getting Started
+
+### Prerequisites
+
+- [Docker/Docker-Compose](https://docs.docker.com/get-docker/)
+- [Java 17](https://www.oracle.com/java/technologies/downloads/)
+- [Maven](https://maven.apache.org/download.cgi)
+- If running locally
+ - [PostgreSQL](https://www.postgresql.org/download/)
+ - [Tomcat](https://tomcat.apache.org/download-90.cgi)
+
+#### Docker
+
+Copy the `.env.example` file to `.env` and fill in the values, then run docker compose to start the containers.
+
+```bash
+cp .env.example .env
+docker compose up -d
+```
+
+#### Standing up just the database
+
+```bash
+docker compuse up -d postgresql
+```
+
+### Developing
+
+To run the application in development mode, run the following command:
+
+```bash
+mvn clean run package -Dmaven.test.skip=true
+```
+
+This will start the application in development mode, and you can access it at `http://localhost:8080`.
+
+### Building
+
+To build the application, run the following command:
+
+```bash
+mvn clean compile package -Dmaven.test.skip=true
+```
+
+This will create a `.war` file in the `target` directory.
+
+### Running Tests
+
+To run the tests, run the following command:
+
+```bash
+mvn test
+```
+
+This will run all the tests in the [src/test](src/test) directory.
+
+### Running MyBatis Generator
+
+To run the MyBatis generator, run the following command:
+
+```bash
+```
+
+This will generate the MyBatis mappers and Java models based on the database schema.
+
+## License
+
+This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
diff --git a/backend-assets/img/logos/midnight-mobile.png b/backend-assets/img/logos/midnight-mobile.png
new file mode 100644
index 0000000..5d6d239
Binary files /dev/null and b/backend-assets/img/logos/midnight-mobile.png differ
diff --git a/backend-assets/img/logos/midnight-mobile.psd b/backend-assets/img/logos/midnight-mobile.psd
new file mode 100644
index 0000000..00b9aff
Binary files /dev/null and b/backend-assets/img/logos/midnight-mobile.psd differ
diff --git a/backend-assets/img/member-badges/star.gif b/backend-assets/img/member-badges/star.gif
new file mode 100644
index 0000000..36deff2
Binary files /dev/null and b/backend-assets/img/member-badges/star.gif differ
diff --git a/backend-assets/img/member-badges/staradmin.gif b/backend-assets/img/member-badges/staradmin.gif
new file mode 100644
index 0000000..c762a87
Binary files /dev/null and b/backend-assets/img/member-badges/staradmin.gif differ
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..55dbb34
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,42 @@
+services:
+ postgresql:
+ container_name: zfgbb_postgresql
+ hostname: zfgbb_postgresql
+ build:
+ context: .
+ dockerfile: Dockerfile
+ target: database
+ env_file:
+ - .env.docker
+ ports:
+ - "${POSTGRES_PORT:-5432}:${POSTGRES_PORT:-5432}"
+ volumes:
+ - data:/var/lib/postgresql/data
+ healthcheck:
+ test: ["CMD-SHELL", "sh -c 'pg_isready -U ${POSTGRES_USER:-postgres} -d ${ZFGBB_DATABASE:-zfgc_dev}'"]
+ interval: 30s
+ timeout: 60s
+ retries: 5
+ start_period: 80s
+
+ zfgbb:
+ container_name: zfgbb
+ hostname: zfgbb
+ build:
+ context: .
+ dockerfile: Dockerfile
+ target: deploy
+ ports:
+ - "${ZFGBB_BACKEND_PORT:-8080}:${ZFGBB_BACKEND_PORT:-8080}"
+ volumes:
+ - logs:/usr/src/app/logs
+ env_file:
+ - .env.docker
+ depends_on:
+ - postgresql
+
+volumes:
+ data:
+ logs:
+
+# Add docker config option
\ No newline at end of file
diff --git a/iac/zfgc.com/docker/host/Dockerfile b/iac/zfgc.com/docker/host/Dockerfile
new file mode 100644
index 0000000..04c8559
--- /dev/null
+++ b/iac/zfgc.com/docker/host/Dockerfile
@@ -0,0 +1,7 @@
+FROM ubuntu:noble as zfgc-com-host
+
+COPY ./scripts/setup-docker.sh /tmp/setup-docker.sh
+
+RUN /tmp/setup-docker.sh && \
+ apt-get prune -y && \
+ rm /tmp/setup-docker.sh
\ No newline at end of file
diff --git a/iac/zfgc.com/docker/host/scripts/setup-docker.sh b/iac/zfgc.com/docker/host/scripts/setup-docker.sh
new file mode 100644
index 0000000..cca9105
--- /dev/null
+++ b/iac/zfgc.com/docker/host/scripts/setup-docker.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+set -e
+set -o pipefail
+
+if [ "$(id -u)" -ne 0 ]; then
+ echo "Please run as root"
+ exit 1
+fi
+
+DEBIAN_FRONTEND=noninteractive apt-get install --assume-yes apt-transport-https ca-certificates curl software-properties-common
+
+curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
+
+echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
+apt-get update
+
+apt-cache policy docker-ce
+DEBIAN_FRONTEND=noninteractive apt-get install --assume-yes docker-ce
diff --git a/iac/zfgc.com/docker/ubuntu-base/Dockerfile b/iac/zfgc.com/docker/ubuntu-base/Dockerfile
new file mode 100644
index 0000000..34cf98b
--- /dev/null
+++ b/iac/zfgc.com/docker/ubuntu-base/Dockerfile
@@ -0,0 +1,11 @@
+FROM ubuntu:noble as zfgc-com-ubuntu-base
+
+COPY ./scripts/setup-docker.sh /tmp/setup-docker.sh
+
+# Override packages using syntaxl like this:
+ # DEBIAN_FRONTEND=noninteractive apt-get install --assume-yes \
+ # package-name=1.0.* \
+ # etc...
+
+RUN apt-get update && \
+ DEBIAN_FRONTEND=noninteractive apt-get install --assume-yes
\ No newline at end of file
diff --git a/iac/zfgc.com/kube/old-skool.yml b/iac/zfgc.com/kube/old-skool.yml
new file mode 100644
index 0000000..bb73444
--- /dev/null
+++ b/iac/zfgc.com/kube/old-skool.yml
@@ -0,0 +1,26 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: zfgc-old-skool
+ labels:
+ app: zfgc-old-skool
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: zfgc-old-skool
+ template:
+ metadata:
+ labels:
+ app: zfgc-old-skool
+ spec:
+ containers:
+ - name: zfgc-old-skool
+ image: zfgc-old-skool:latest
+ ports:
+ - containerPort: 8080
+ env:
+ - name: MYSQL_HOST
+ value: zfgc-old-skool-mysql
+ - name: MYSQL_PORT
+ value: "3306"
\ No newline at end of file
diff --git a/iac/zfgc.com/kube/zfgc-bb.yml b/iac/zfgc.com/kube/zfgc-bb.yml
new file mode 100644
index 0000000..d629a63
--- /dev/null
+++ b/iac/zfgc.com/kube/zfgc-bb.yml
@@ -0,0 +1,43 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: zfgc-bb
+ labels:
+ app: zfgc-bb
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: zfgc-bb
+ template:
+ metadata:
+ labels:
+ app: zfgc-bb
+ spec:
+ containers:
+ - name: zfgc-bb
+ image: zfgc-bb:latest
+ ports:
+ - containerPort: 8080
+ env:
+ - name: SPRING_DATASOURCE_URL
+ value: jdbc:mysql://zfgc-bb-mysql:3306/zfgcbb?useSSL=false&useUnicode=true&characterEncoding=utf-8&serverTimezone=UTC
+ - name: SPRING_DATASOURCE_USERNAME
+ value: zfgcbb
+ - name: SPRING_DATASOURCE_PASSWORD
+ value: zfgcbb
+
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: zfgc-bb
+spec:
+ selector:
+ app: zfgc-bb
+ ports:
+ - protocol: TCP
+ port: 8080
+ targetPort: 8080
+ type: NodePort
+
\ No newline at end of file
diff --git a/mvnw b/mvnw
index 8a8fb22..97347cb 100644
--- a/mvnw
+++ b/mvnw
@@ -1,316 +1,316 @@
-#!/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
-#
-# https://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.
-# ----------------------------------------------------------------------------
-
-# ----------------------------------------------------------------------------
-# Maven Start Up Batch script
-#
-# Required ENV vars:
-# ------------------
-# JAVA_HOME - location of a JDK home dir
-#
-# Optional ENV vars
-# -----------------
-# M2_HOME - location of maven2's installed home dir
-# MAVEN_OPTS - parameters passed to the Java VM when running Maven
-# e.g. to debug Maven itself, use
-# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
-# ----------------------------------------------------------------------------
-
-if [ -z "$MAVEN_SKIP_RC" ] ; then
-
- if [ -f /usr/local/etc/mavenrc ] ; then
- . /usr/local/etc/mavenrc
- fi
-
- if [ -f /etc/mavenrc ] ; then
- . /etc/mavenrc
- fi
-
- if [ -f "$HOME/.mavenrc" ] ; then
- . "$HOME/.mavenrc"
- fi
-
-fi
-
-# OS specific support. $var _must_ be set to either true or false.
-cygwin=false;
-darwin=false;
-mingw=false
-case "`uname`" in
- CYGWIN*) cygwin=true ;;
- MINGW*) mingw=true;;
- Darwin*) darwin=true
- # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
- # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
- if [ -z "$JAVA_HOME" ]; then
- if [ -x "/usr/libexec/java_home" ]; then
- export JAVA_HOME="`/usr/libexec/java_home`"
- else
- export JAVA_HOME="/Library/Java/Home"
- fi
- fi
- ;;
-esac
-
-if [ -z "$JAVA_HOME" ] ; then
- if [ -r /etc/gentoo-release ] ; then
- JAVA_HOME=`java-config --jre-home`
- fi
-fi
-
-if [ -z "$M2_HOME" ] ; then
- ## resolve links - $0 may be a link to maven's home
- PRG="$0"
-
- # need this for relative symlinks
- while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG="`dirname "$PRG"`/$link"
- fi
- done
-
- saveddir=`pwd`
-
- M2_HOME=`dirname "$PRG"`/..
-
- # make it fully qualified
- M2_HOME=`cd "$M2_HOME" && pwd`
-
- cd "$saveddir"
- # echo Using m2 at $M2_HOME
-fi
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin ; then
- [ -n "$M2_HOME" ] &&
- M2_HOME=`cygpath --unix "$M2_HOME"`
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
- [ -n "$CLASSPATH" ] &&
- CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
-fi
-
-# For Mingw, ensure paths are in UNIX format before anything is touched
-if $mingw ; then
- [ -n "$M2_HOME" ] &&
- M2_HOME="`(cd "$M2_HOME"; pwd)`"
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
-fi
-
-if [ -z "$JAVA_HOME" ]; then
- javaExecutable="`which javac`"
- if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
- # readlink(1) is not available as standard on Solaris 10.
- readLink=`which readlink`
- if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
- if $darwin ; then
- javaHome="`dirname \"$javaExecutable\"`"
- javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
- else
- javaExecutable="`readlink -f \"$javaExecutable\"`"
- fi
- javaHome="`dirname \"$javaExecutable\"`"
- javaHome=`expr "$javaHome" : '\(.*\)/bin'`
- JAVA_HOME="$javaHome"
- export JAVA_HOME
- fi
- fi
-fi
-
-if [ -z "$JAVACMD" ] ; then
- 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"
- else
- JAVACMD="$JAVA_HOME/bin/java"
- fi
- else
- JAVACMD="`\\unset -f command; \\command -v java`"
- fi
-fi
-
-if [ ! -x "$JAVACMD" ] ; then
- echo "Error: JAVA_HOME is not defined correctly." >&2
- echo " We cannot execute $JAVACMD" >&2
- exit 1
-fi
-
-if [ -z "$JAVA_HOME" ] ; then
- echo "Warning: JAVA_HOME environment variable is not set."
-fi
-
-CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
-
-# traverses directory structure from process work directory to filesystem root
-# first directory with .mvn subdirectory is considered project base directory
-find_maven_basedir() {
-
- if [ -z "$1" ]
- then
- echo "Path not specified to find_maven_basedir"
- return 1
- fi
-
- basedir="$1"
- wdir="$1"
- while [ "$wdir" != '/' ] ; do
- if [ -d "$wdir"/.mvn ] ; then
- basedir=$wdir
- break
- fi
- # workaround for JBEAP-8937 (on Solaris 10/Sparc)
- if [ -d "${wdir}" ]; then
- wdir=`cd "$wdir/.."; pwd`
- fi
- # end of workaround
- done
- echo "${basedir}"
-}
-
-# concatenates all lines of a file
-concat_lines() {
- if [ -f "$1" ]; then
- echo "$(tr -s '\n' ' ' < "$1")"
- fi
-}
-
-BASE_DIR=`find_maven_basedir "$(pwd)"`
-if [ -z "$BASE_DIR" ]; then
- exit 1;
-fi
-
-##########################################################################################
-# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
-# This allows using the maven wrapper in projects that prohibit checking in binary data.
-##########################################################################################
-if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Found .mvn/wrapper/maven-wrapper.jar"
- fi
-else
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
- fi
- if [ -n "$MVNW_REPOURL" ]; then
- jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
- else
- jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
- fi
- while IFS="=" read key value; do
- case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
- esac
- done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Downloading from: $jarUrl"
- fi
- wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
- if $cygwin; then
- wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
- fi
-
- if command -v wget > /dev/null; then
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Found wget ... using wget"
- fi
- if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
- wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
- else
- wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
- fi
- elif command -v curl > /dev/null; then
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Found curl ... using curl"
- fi
- if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
- curl -o "$wrapperJarPath" "$jarUrl" -f
- else
- curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
- fi
-
- else
- if [ "$MVNW_VERBOSE" = true ]; then
- echo "Falling back to using Java to download"
- fi
- javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
- # For Cygwin, switch paths to Windows format before running javac
- if $cygwin; then
- javaClass=`cygpath --path --windows "$javaClass"`
- fi
- if [ -e "$javaClass" ]; then
- if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
- if [ "$MVNW_VERBOSE" = true ]; then
- echo " - Compiling MavenWrapperDownloader.java ..."
- fi
- # Compiling the Java class
- ("$JAVA_HOME/bin/javac" "$javaClass")
- fi
- if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
- # Running the downloader
- if [ "$MVNW_VERBOSE" = true ]; then
- echo " - Running MavenWrapperDownloader.java ..."
- fi
- ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
- fi
- fi
- fi
-fi
-##########################################################################################
-# End of extension
-##########################################################################################
-
-export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
-if [ "$MVNW_VERBOSE" = true ]; then
- echo $MAVEN_PROJECTBASEDIR
-fi
-MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin; then
- [ -n "$M2_HOME" ] &&
- M2_HOME=`cygpath --path --windows "$M2_HOME"`
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
- [ -n "$CLASSPATH" ] &&
- CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
- [ -n "$MAVEN_PROJECTBASEDIR" ] &&
- MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
-fi
-
-# Provide a "standardized" way to retrieve the CLI args that will
-# work with both Windows and non-Windows executions.
-MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
-export MAVEN_CMD_LINE_ARGS
-
-WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
-
-exec "$JAVACMD" \
- $MAVEN_OPTS \
- $MAVEN_DEBUG_OPTS \
- -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
- "-Dmaven.home=${M2_HOME}" \
- "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
- ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
+#!/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
+#
+# https://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.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /usr/local/etc/mavenrc ] ; then
+ . /usr/local/etc/mavenrc
+ fi
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ export JAVA_HOME="`/usr/libexec/java_home`"
+ else
+ export JAVA_HOME="/Library/Java/Home"
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="`which javac`"
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=`which readlink`
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+ if $darwin ; then
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+ else
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
+ fi
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ 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"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="`\\unset -f command; \\command -v java`"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=`cd "$wdir/.."; pwd`
+ fi
+ # end of workaround
+ done
+ echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ echo "$(tr -s '\n' ' ' < "$1")"
+ fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found .mvn/wrapper/maven-wrapper.jar"
+ fi
+else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+ fi
+ if [ -n "$MVNW_REPOURL" ]; then
+ jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+ else
+ jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+ fi
+ while IFS="=" read key value; do
+ case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+ esac
+ done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Downloading from: $jarUrl"
+ fi
+ wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+ if $cygwin; then
+ wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+ fi
+
+ if command -v wget > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found wget ... using wget"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
+ else
+ wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
+ fi
+ elif command -v curl > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found curl ... using curl"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ curl -o "$wrapperJarPath" "$jarUrl" -f
+ else
+ curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+ fi
+
+ else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Falling back to using Java to download"
+ fi
+ javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+ # For Cygwin, switch paths to Windows format before running javac
+ if $cygwin; then
+ javaClass=`cygpath --path --windows "$javaClass"`
+ fi
+ if [ -e "$javaClass" ]; then
+ if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Compiling MavenWrapperDownloader.java ..."
+ fi
+ # Compiling the Java class
+ ("$JAVA_HOME/bin/javac" "$javaClass")
+ fi
+ if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ # Running the downloader
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Running MavenWrapperDownloader.java ..."
+ fi
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+ fi
+ fi
+ fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+ echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ $MAVEN_DEBUG_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}" \
+ "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/mvnw.cmd b/mvnw.cmd
index 1d8ab01..2baaa67 100644
--- a/mvnw.cmd
+++ b/mvnw.cmd
@@ -1,188 +1,188 @@
-@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 https://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 Maven Start Up Batch script
-@REM
-@REM Required ENV vars:
-@REM JAVA_HOME - location of a JDK home dir
-@REM
-@REM Optional ENV vars
-@REM M2_HOME - location of maven2's installed home dir
-@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
-@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
-@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
-@REM e.g. to debug Maven itself, use
-@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
-@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
-@REM ----------------------------------------------------------------------------
-
-@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
-@echo off
-@REM set title of command window
-title %0
-@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
-@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
-
-@REM set %HOME% to equivalent of $HOME
-if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
-
-@REM Execute a user defined script before this one
-if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
-@REM check for pre script, once with legacy .bat ending and once with .cmd ending
-if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
-if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
-:skipRcPre
-
-@setlocal
-
-set ERROR_CODE=0
-
-@REM To isolate internal variables from possible post scripts, we use another setlocal
-@setlocal
-
-@REM ==== START VALIDATION ====
-if not "%JAVA_HOME%" == "" goto OkJHome
-
-echo.
-echo Error: JAVA_HOME not found in your environment. >&2
-echo Please set the JAVA_HOME variable in your environment to match the >&2
-echo location of your Java installation. >&2
-echo.
-goto error
-
-:OkJHome
-if exist "%JAVA_HOME%\bin\java.exe" goto init
-
-echo.
-echo Error: JAVA_HOME is set to an invalid directory. >&2
-echo JAVA_HOME = "%JAVA_HOME%" >&2
-echo Please set the JAVA_HOME variable in your environment to match the >&2
-echo location of your Java installation. >&2
-echo.
-goto error
-
-@REM ==== END VALIDATION ====
-
-:init
-
-@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
-@REM Fallback to current working directory if not found.
-
-set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
-IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
-
-set EXEC_DIR=%CD%
-set WDIR=%EXEC_DIR%
-:findBaseDir
-IF EXIST "%WDIR%"\.mvn goto baseDirFound
-cd ..
-IF "%WDIR%"=="%CD%" goto baseDirNotFound
-set WDIR=%CD%
-goto findBaseDir
-
-:baseDirFound
-set MAVEN_PROJECTBASEDIR=%WDIR%
-cd "%EXEC_DIR%"
-goto endDetectBaseDir
-
-:baseDirNotFound
-set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
-cd "%EXEC_DIR%"
-
-:endDetectBaseDir
-
-IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
-
-@setlocal EnableExtensions EnableDelayedExpansion
-for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
-@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
-
-:endReadAdditionalConfig
-
-SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
-set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
-set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
-
-set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
-
-FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
- IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
-)
-
-@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
-@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
-if exist %WRAPPER_JAR% (
- if "%MVNW_VERBOSE%" == "true" (
- echo Found %WRAPPER_JAR%
- )
-) else (
- if not "%MVNW_REPOURL%" == "" (
- SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
- )
- if "%MVNW_VERBOSE%" == "true" (
- echo Couldn't find %WRAPPER_JAR%, downloading it ...
- echo Downloading from: %DOWNLOAD_URL%
- )
-
- powershell -Command "&{"^
- "$webclient = new-object System.Net.WebClient;"^
- "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
- "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
- "}"^
- "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
- "}"
- if "%MVNW_VERBOSE%" == "true" (
- echo Finished downloading %WRAPPER_JAR%
- )
-)
-@REM End of extension
-
-@REM Provide a "standardized" way to retrieve the CLI args that will
-@REM work with both Windows and non-Windows executions.
-set MAVEN_CMD_LINE_ARGS=%*
-
-%MAVEN_JAVA_EXE% ^
- %JVM_CONFIG_MAVEN_PROPS% ^
- %MAVEN_OPTS% ^
- %MAVEN_DEBUG_OPTS% ^
- -classpath %WRAPPER_JAR% ^
- "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
- %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
-if ERRORLEVEL 1 goto error
-goto end
-
-:error
-set ERROR_CODE=1
-
-:end
-@endlocal & set ERROR_CODE=%ERROR_CODE%
-
-if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
-@REM check for post script, once with legacy .bat ending and once with .cmd ending
-if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
-if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
-:skipRcPost
-
-@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
-if "%MAVEN_BATCH_PAUSE%"=="on" pause
-
-if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
-
-cmd /C exit /B %ERROR_CODE%
+@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 https://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 Maven Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
+if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+
+FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+ IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Found %WRAPPER_JAR%
+ )
+) else (
+ if not "%MVNW_REPOURL%" == "" (
+ SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+ )
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Couldn't find %WRAPPER_JAR%, downloading it ...
+ echo Downloading from: %DOWNLOAD_URL%
+ )
+
+ powershell -Command "&{"^
+ "$webclient = new-object System.Net.WebClient;"^
+ "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+ "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+ "}"^
+ "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+ "}"
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Finished downloading %WRAPPER_JAR%
+ )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% ^
+ %JVM_CONFIG_MAVEN_PROPS% ^
+ %MAVEN_OPTS% ^
+ %MAVEN_DEBUG_OPTS% ^
+ -classpath %WRAPPER_JAR% ^
+ "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
+ %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
+if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%"=="on" pause
+
+if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
+
+cmd /C exit /B %ERROR_CODE%
diff --git a/pom.xml b/pom.xml
index ed74d3b..5b4fc1d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,18 +5,19 @@
org.springframework.boot
spring-boot-starter-parent
- 3.3.2-SNAPSHOT
+ 3.4.0-RC1
com.zfgc
zfgbb
- 0.0.1-SNAPSHOT
+ 1.0.0-SNAPSHOT
war
zfgbb
Demo project for Spring Boot
17
+
org.springframework.boot
@@ -77,18 +78,18 @@
org.apache.commons
commons-lang3
- 3.12.0
+ 3.17.0
org.modelmapper
modelmapper
- 3.1.0
+ 3.2.1
com.google.guava
guava
- 31.1-jre
+ 33.3.1-jre
diff --git a/scripts/sql/provisioning/1-zfgbb.initialize-database.sh b/scripts/sql/provisioning/1-zfgbb.initialize-database.sh
new file mode 100644
index 0000000..e010a85
--- /dev/null
+++ b/scripts/sql/provisioning/1-zfgbb.initialize-database.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+psql --username "$POSTGRES_USER" --command "
+ -- Create Roles
+ CREATE ROLE ZFGCADMIN
+ WITH
+ NOLOGIN NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT NOREPLICATION NOBYPASSRLS CONNECTION
+ LIMIT
+ -1;
+
+ COMMENT ON ROLE ZFGCADMIN IS 'Admin users.';
+
+ -- Create User
+ CREATE ROLE $ZFGBB_USER
+ WITH
+ LOGIN NOSUPERUSER NOCREATEDB NOCREATEROLE INHERIT NOREPLICATION NOBYPASSRLS CONNECTION
+ LIMIT
+ -1 PASSWORD '$ZFGBB_USER_PASSWORD';
+
+ GRANT ZFGCADMIN TO $ZFGBB_USER
+ WITH
+ ADMIN OPTION;
+
+ COMMENT ON ROLE $ZFGBB_USER IS 'Default ZFGBB User.';
+"
+
+psql --username "$POSTGRES_USER" --command "
+ -- Create Database
+ CREATE DATABASE $ZFGBB_DATABASE
+ WITH
+ OWNER = $ZFGBB_USER;
+ GRANT ALL ON DATABASE $ZFGBB_DATABASE TO zfgcadmin WITH GRANT OPTION;
+ GRANT ALL ON DATABASE $ZFGBB_DATABASE TO $ZFGBB_USER;
+"
+
+psql --username "$POSTGRES_USER" --dbname "$ZFGBB_DATABASE" --command "
+ CREATE SCHEMA IF NOT EXISTS ZFGBB AUTHORIZATION $ZFGBB_USER;
+ COMMENT ON SCHEMA ZFGBB IS 'ZFGBB Schema.';
+
+ GRANT ALL ON SCHEMA ZFGBB TO $ZFGBB_USER;
+ GRANT ALL ON SCHEMA ZFGBB TO ZFGCADMIN WITH GRANT OPTION;
+
+ ALTER DEFAULT PRIVILEGES IN SCHEMA ZFGBB GRANT ALL ON TABLES TO ZFGCADMIN;
+ GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA ZFGBB TO ZFGCADMIN;
+"
+
+psql --username "$POSTGRES_USER" --dbname "$ZFGBB_DATABASE" -a -f ./2-provision-database
\ No newline at end of file
diff --git a/scripts/sql/provisioning/2-provision-database.sql b/scripts/sql/provisioning/2-provision-database.sql
new file mode 100644
index 0000000..d845053
--- /dev/null
+++ b/scripts/sql/provisioning/2-provision-database.sql
@@ -0,0 +1,311 @@
+CREATE SEQUENCE IF NOT EXISTS PUBLIC.BOARD_SEQUENCE START
+WITH
+ 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
+
+CREATE SEQUENCE IF NOT EXISTS ZFGBB.ATTRIBUTE_DATA_TYPE_ATTRIBUTE_DATA_TYPE_ID_SEQ AS INTEGER START
+WITH
+ 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
+
+CREATE SEQUENCE IF NOT EXISTS ZFGBB.BB_CODE_ATTRIBUTE_BB_CODE_ATTRIBUTE_ID_SEQ AS INTEGER START
+WITH
+ 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
+
+CREATE SEQUENCE IF NOT EXISTS ZFGBB.BB_CODE_ATTRIBUTE_MODE_BB_CODE_ATTRIBUTE_MODE_ID_SEQ AS INTEGER START
+WITH
+ 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
+
+CREATE SEQUENCE IF NOT EXISTS ZFGBB.BB_CODE_CONFIG_BB_CODE_CONFIG_ID_SEQ AS INTEGER START
+WITH
+ 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
+
+CREATE SEQUENCE IF NOT EXISTS ZFGBB.BOARD_BOARD_ID_SEQ AS INTEGER START
+WITH
+ 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
+
+CREATE SEQUENCE IF NOT EXISTS ZFGBB.BR_BOARD_PERMISSION_BR_BOARD_PERMISSION_ID_SEQ AS INTEGER START
+WITH
+ 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
+
+CREATE SEQUENCE IF NOT EXISTS ZFGBB.BR_USER_PERMISSION_BR_USER_PERMISSION_ID_SEQ AS INTEGER START
+WITH
+ 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
+
+CREATE SEQUENCE IF NOT EXISTS ZFGBB.EMAIL_ADDRESS_EMAIL_ADDRESS_ID_SEQ AS INTEGER START
+WITH
+ 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
+
+CREATE SEQUENCE IF NOT EXISTS ZFGBB.FORUM_FORUM_ID_SEQ AS INTEGER START
+WITH
+ 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
+
+CREATE SEQUENCE IF NOT EXISTS ZFGBB.MESSAGE_HISTORY_MESSAGE_HISTORY_ID_SEQ AS INTEGER START
+WITH
+ 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
+
+CREATE SEQUENCE IF NOT EXISTS ZFGBB.MESSAGE_MESSAGE_ID_SEQ AS INTEGER START
+WITH
+ 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
+
+CREATE SEQUENCE IF NOT EXISTS ZFGBB.PERMISSION_PERMISSION_ID_SEQ AS INTEGER START
+WITH
+ 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
+
+CREATE SEQUENCE IF NOT EXISTS ZFGBB.THREAD_THREAD_ID_SEQ AS INTEGER START
+WITH
+ 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
+
+CREATE SEQUENCE IF NOT EXISTS ZFGBB.USER_USER_ID_SEQ AS INTEGER START
+WITH
+ 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
+
+CREATE TABLE IF NOT EXISTS ZFGBB.IP_ADDRESS (
+ IP_ADDRESS_ID INTEGER NOT NULL,
+ IP TEXT NOT NULL,
+ IP_V6_FLAG BOOLEAN NOT NULL,
+ IS_SPAMMER_FLAG BOOLEAN NOT NULL,
+ CREATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ UPDATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CONSTRAINT IP_ADDRESS_PKEY PRIMARY KEY (IP_ADDRESS_ID)
+);
+
+ALTER TABLE IF EXISTS ZFGBB.IP_ADDRESS OWNER TO ZFGCADMIN;
+
+CREATE TABLE IF NOT EXISTS ZFGBB.ATTRIBUTE_DATA_TYPE (
+ ATTRIBUTE_DATA_TYPE_ID INTEGER GENERATED BY default AS PRIMARY KEY,
+ TYPE_NAME CHARACTER VARYING(12) NOT NULL,
+ CREATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ UPDATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CONSTRAINT ATTRIBUTE_DATA_TYPE_PKEY PRIMARY KEY (ATTRIBUTE_DATA_TYPE_ID)
+);
+
+ALTER TABLE IF EXISTS ZFGBB.ATTRIBUTE_DATA_TYPE OWNER TO ZFGCADMIN;
+
+CREATE TABLE IF NOT EXISTS ZFGBB.BB_CODE_ATTRIBUTE (
+ BB_CODE_ATTRIBUTE_ID INTEGER DEFAULT NEXTVAL(
+ 'zfgbb.bb_code_attribute_bb_code_attribute_id_seq'::REGCLASS
+ ) NOT NULL,
+ ATTRIBUTE_DATA_TYPE INTEGER NOT NULL,
+ ATTRIBUTE_INDEX INTEGER NOT NULL,
+ BB_CODE_ATTRIBUTE_MODE_ID INTEGER NOT NULL,
+ NAME CHARACTER VARYING(32) NOT NULL,
+ CREATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ UPDATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CONSTRAINT BB_CODE_ATTRIBUTE_PKEY PRIMARY KEY (BB_CODE_ATTRIBUTE_ID)
+);
+
+ALTER TABLE IF EXISTS ZFGBB.BB_CODE_ATTRIBUTE OWNER TO ZFGCADMIN;
+
+CREATE TABLE IF NOT EXISTS ZFGBB.BB_CODE_ATTRIBUTE_MODE (
+ BB_CODE_ATTRIBUTE_MODE_ID INTEGER DEFAULT NEXTVAL(
+ 'zfgbb.bb_code_attribute_mode_bb_code_attribute_mode_id_seq'::REGCLASS
+ ) NOT NULL,
+ BB_CODE_CONFIG_ID INTEGER NOT NULL,
+ CONTENT_IS_ATTRIBUTE_FLAG BOOLEAN DEFAULT FALSE NOT NULL,
+ OPEN_TAG CHARACTER VARYING(64) NOT NULL,
+ CLOSE_TAG CHARACTER VARYING(64) NOT NULL,
+ OUTPUT_CONTENT_FLAG BOOLEAN DEFAULT FALSE NOT NULL,
+ CREATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ UPDATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CONSTRAINT BB_CODE_ATTRIBUTE_MODE_PKEY PRIMARY KEY (BB_CODE_ATTRIBUTE_MODE_ID)
+);
+
+ALTER TABLE IF EXISTS ZFGBB.BB_CODE_ATTRIBUTE_MODE OWNER TO ZFGCADMIN;
+
+CREATE TABLE IF NOT EXISTS ZFGBB.BB_CODE_CONFIG (
+ BB_CODE_CONFIG_ID INTEGER DEFAULT NEXTVAL(
+ 'zfgbb.bb_code_config_bb_code_config_id_seq'::REGCLASS
+ ) NOT NULL,
+ CODE CHARACTER VARYING(12) NOT NULL,
+ END_TAG CHARACTER VARYING(32) NOT NULL,
+ PROCESS_CONTENT_FLAG BOOLEAN DEFAULT FALSE NOT NULL,
+ CREATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ UPDATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CONSTRAINT BB_CODE_CONFIG_CODE_KEY UNIQUE (CODE),
+ CONSTRAINT BB_CODE_CONFIG_PKEY PRIMARY KEY (BB_CODE_CONFIG_ID)
+);
+
+ALTER TABLE IF EXISTS ZFGBB.BB_CODE_CONFIG OWNER TO ZFGCADMIN;
+
+CREATE TABLE IF NOT EXISTS ZFGBB.PERMISSION (
+ PERMISSION_ID INTEGER DEFAULT NEXTVAL('zfgbb.permission_permission_id_seq'::REGCLASS) NOT NULL,
+ PERMISSION_NAME CHARACTER VARYING(32) NOT NULL,
+ PERMISSION_CODE CHARACTER VARYING(64) NOT NULL,
+ CREATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ UPDATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ CONSTRAINT PERMISSION_PKEY PRIMARY KEY (PERMISSION_ID)
+);
+
+ALTER TABLE IF EXISTS ZFGBB.PERMISSION OWNER TO ZFGCADMIN;
+
+CREATE TABLE IF NOT EXISTS ZFGBB.USER (
+ USER_ID INTEGER DEFAULT NEXTVAL('zfgbb.user_user_id_seq'::REGCLASS) NOT NULL,
+ CREATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ UPDATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ SSO_KEY CHARACTER VARYING(64) NOT NULL,
+ ACTIVE_FLAG BOOLEAN DEFAULT FALSE NOT NULL,
+ DISPLAY_NAME CHARACTER VARYING NOT NULL,
+ CONSTRAINT USER_PKEY PRIMARY KEY (USER_ID)
+);
+
+ALTER TABLE IF EXISTS ZFGBB.USER OWNER TO ZFGCADMIN;
+
+CREATE TABLE IF NOT EXISTS ZFGBB.CATEGORY (
+ CATEGORY_ID INTEGER DEFAULT NEXTVAL('zfgbb.forum_forum_id_seq'::REGCLASS) NOT NULL,
+ CATEGORY_NAME CHARACTER VARYING(32) NOT NULL,
+ DESCRIPTION CHARACTER VARYING(64),
+ CREATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP,
+ UPDATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP,
+ PARENT_BOARD_ID INTEGER,
+ CONSTRAINT FORUM_PKEY PRIMARY KEY (CATEGORY_ID)
+);
+
+ALTER TABLE IF EXISTS ZFGBB.CATEGORY OWNER TO ZFGCADMIN;
+
+CREATE TABLE IF NOT EXISTS ZFGBB.BOARD (
+ BOARD_ID INTEGER DEFAULT NEXTVAL('zfgbb.board_board_id_seq'::REGCLASS) NOT NULL,
+ BOARD_NAME TEXT NOT NULL,
+ DESCRIPTION TEXT,
+ CREATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP,
+ UPDATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP,
+ CATEGORY_ID INTEGER,
+ CONSTRAINT BOARD_PKEY PRIMARY KEY (BOARD_ID),
+ CONSTRAINT FK_BOARD_CATEGORY_ID FOREIGN KEY (CATEGORY_ID) REFERENCES ZFGBB.CATEGORY (CATEGORY_ID) NOT VALID
+);
+
+ALTER TABLE IF EXISTS ZFGBB.BOARD OWNER TO ZFGCADMIN;
+
+CREATE TABLE IF NOT EXISTS ZFGBB.THREAD (
+ THREAD_ID INTEGER DEFAULT NEXTVAL('zfgbb.thread_thread_id_seq'::REGCLASS) NOT NULL,
+ THREAD_NAME CHARACTER VARYING(64) NOT NULL,
+ LOCKED_FLAG BOOLEAN DEFAULT FALSE NOT NULL,
+ PINNED_FLAG BOOLEAN DEFAULT FALSE NOT NULL,
+ CREATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ UPDATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ BOARD_ID INTEGER NOT NULL,
+ CREATED_USER_ID INTEGER NOT NULL,
+ CONSTRAINT THREAD_PKEY PRIMARY KEY (THREAD_ID),
+ CONSTRAINT FK_THREAD_BOARD_ID FOREIGN KEY (BOARD_ID) REFERENCES ZFGBB.BOARD (BOARD_ID) NOT VALID,
+ CONSTRAINT FK_THREAD_CREATED_USER_ID FOREIGN KEY (CREATED_USER_ID) REFERENCES ZFGBB.USER (USER_ID) NOT VALID
+);
+
+ALTER TABLE IF EXISTS ZFGBB.THREAD OWNER TO ZFGCADMIN;
+
+CREATE TABLE IF NOT EXISTS ZFGBB.MESSAGE (
+ MESSAGE_ID INTEGER DEFAULT NEXTVAL('zfgbb.message_message_id_seq'::REGCLASS) NOT NULL,
+ OWNER_ID INTEGER NOT NULL,
+ THREAD_ID INTEGER,
+ CREATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ UPDATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ POST_IN_THREAD INTEGER DEFAULT 0 NOT NULL,
+ CONSTRAINT MESSAGE_PKEY PRIMARY KEY (MESSAGE_ID),
+ CONSTRAINT FK_MESSAGE_THREAD_ID FOREIGN KEY (THREAD_ID) REFERENCES ZFGBB.THREAD (THREAD_ID) NOT VALID,
+ CONSTRAINT FK_MESSAGE_USER_ID FOREIGN KEY (OWNER_ID) REFERENCES ZFGBB.USER (USER_ID) NOT VALID
+);
+
+ALTER TABLE IF EXISTS ZFGBB.MESSAGE OWNER TO ZFGCADMIN;
+
+CREATE TABLE IF NOT EXISTS ZFGBB.MESSAGE_HISTORY (
+ MESSAGE_HISTORY_ID INTEGER DEFAULT NEXTVAL(
+ 'zfgbb.message_history_message_history_id_seq'::REGCLASS
+ ) NOT NULL,
+ MESSAGE_ID INTEGER NOT NULL,
+ MESSAGE_TEXT TEXT NOT NULL,
+ CURRENT_FLAG BOOLEAN DEFAULT FALSE NOT NULL,
+ CREATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ UPDATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ IP_ADDRESS_ID INTEGER NOT NULL,
+ CONSTRAINT MESSAGE_HISTORY_PKEY PRIMARY KEY (MESSAGE_ID),
+ CONSTRAINT FK_MESSAGE_HISTORY_IP_ADDRESS_ID FOREIGN KEY (IP_ADDRESS_ID) REFERENCES ZFGBB.IP_ADDRESS (IP_ADDRESS_ID) NOT VALID,
+ CONSTRAINT FK_MESSAGE_HISTORY_MESSAGE_ID FOREIGN KEY (MESSAGE_ID) REFERENCES ZFGBB.MESSAGE (MESSAGE_ID) NOT VALID
+);
+
+ALTER TABLE IF EXISTS ZFGBB.MESSAGE_HISTORY OWNER TO ZFGCADMIN;
+
+
+CREATE TABLE IF NOT EXISTS ZFGBB.EMAIL_ADDRESS (
+ EMAIL_ADDRESS_ID INTEGER DEFAULT NEXTVAL(
+ 'zfgbb.email_address_email_address_id_seq'::REGCLASS
+ ) NOT NULL,
+ EMAIL_ADDRESS CHARACTER VARYING(32) NOT NULL,
+ CREATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ UPDATED_TS TIMESTAMP WITHOUT TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
+ SPAMMER_FLAG BOOLEAN DEFAULT FALSE NOT NULL,
+ USER_ID INTEGER,
+ CONSTRAINT EMAIL_ADDRESS_PKEY PRIMARY KEY (EMAIL_ADDRESS_ID),
+ CONSTRAINT UN_EMAIL_ADDRESS_USER_ID UNIQUE (USER_ID),
+ CONSTRAINT FK_EMAIL_ADDRESS_USER_ID FOREIGN KEY (USER_ID) REFERENCES ZFGBB.USER (USER_ID) NOT VALID
+);
+
+ALTER TABLE IF EXISTS ZFGBB.EMAIL_ADDRESS OWNER TO ZFGCADMIN;
+
+CREATE TABLE IF NOT EXISTS ZFGBB.BR_BOARD_PERMISSION (
+ BR_BOARD_PERMISSION_ID INTEGER DEFAULT NEXTVAL(
+ 'zfgbb.br_board_permission_br_board_permission_id_seq'::REGCLASS
+ ) NOT NULL,
+ BOARD_ID INTEGER NOT NULL,
+ PERMISSION_ID INTEGER NOT NULL,
+ CONSTRAINT BR_BOARD_PERMISSION_PKEY PRIMARY KEY (BR_BOARD_PERMISSION_ID),
+ CONSTRAINT UN_BOARD_PERMISSION UNIQUE (BOARD_ID, PERMISSION_ID),
+ CONSTRAINT FK_BOARD_PERMISSION_BOARD_ID FOREIGN KEY (BOARD_ID) REFERENCES ZFGBB.BOARD (BOARD_ID) NOT VALID,
+ CONSTRAINT FK_BOARD_PERMISSION_PERMISSION_ID FOREIGN KEY (PERMISSION_ID) REFERENCES ZFGBB.PERMISSION (PERMISSION_ID) NOT VALID
+);
+
+ALTER TABLE IF EXISTS ZFGBB.BR_BOARD_PERMISSION OWNER TO ZFGCADMIN;
+
+CREATE OR REPLACE VIEW ZFGBB.BOARD_PERMISSION_VIEW AS
+SELECT
+ B.BOARD_ID,
+ P.PERMISSION_ID,
+ P.PERMISSION_CODE,
+ P.PERMISSION_NAME
+FROM
+ (
+ (
+ ZFGBB.BR_BOARD_PERMISSION BR
+ JOIN ZFGBB.PERMISSION P ON ((P.PERMISSION_ID = BR.PERMISSION_ID))
+ )
+ JOIN ZFGBB.BOARD B ON ((B.BOARD_ID = BR.BOARD_ID))
+ );
+
+CREATE TABLE IF NOT EXISTS ZFGBB.BR_USER_PERMISSION (
+ BR_USER_PERMISSION_ID INTEGER DEFAULT NEXTVAL(
+ 'zfgbb.br_user_permission_br_user_permission_id_seq'::REGCLASS
+ ) NOT NULL,
+ USER_PERMISSION_ID INTEGER NOT NULL,
+ USER_ID INTEGER NOT NULL,
+ CONSTRAINT BR_USER_PERMISSION_PKEY PRIMARY KEY (BR_USER_PERMISSION_ID),
+ CONSTRAINT FK_BR_USER_PERMISSION_ID_USER_ID FOREIGN KEY (USER_ID) REFERENCES ZFGBB.USER (USER_ID) MATCH FULL NOT VALID,
+ CONSTRAINT FK_BR_USER_PERMISSION_PERMISSION_ID FOREIGN KEY (USER_PERMISSION_ID) REFERENCES ZFGBB.PERMISSION (PERMISSION_ID) MATCH FULL NOT VALID
+);
+
+ALTER TABLE IF EXISTS ZFGBB.BR_USER_PERMISSION OWNER TO ZFGCADMIN;
+
+CREATE OR REPLACE VIEW ZFGBB.USER_PERMISSION_VIEW AS
+SELECT
+ U.USER_ID,
+ P.PERMISSION_ID,
+ P.PERMISSION_CODE
+FROM
+ (
+ ZFGBB.BR_USER_PERMISSION U
+ JOIN ZFGBB.PERMISSION P ON ((P.PERMISSION_ID = U.USER_PERMISSION_ID))
+ );
+
+CREATE OR REPLACE VIEW ZFGBB.CURRENT_MESSAGE_VIEW AS
+SELECT
+ M.MESSAGE_ID,
+ M.OWNER_ID,
+ M.THREAD_ID,
+ H.MESSAGE_TEXT,
+ H.MESSAGE_HISTORY_ID,
+ M.POST_IN_THREAD
+FROM
+ (
+ ZFGBB.MESSAGE M
+ JOIN ZFGBB.MESSAGE_HISTORY H ON (
+ (
+ (H.MESSAGE_ID = M.MESSAGE_ID)
+ AND (H.CURRENT_FLAG = TRUE)
+ )
+ )
+ );
\ No newline at end of file
diff --git a/src/main/database/tables/BOARD.sql b/src/main/database/tables/BOARD.sql
index 273e650..f10c87d 100644
--- a/src/main/database/tables/BOARD.sql
+++ b/src/main/database/tables/BOARD.sql
@@ -1,39 +1,39 @@
--- Table: zfgbb.board
-
--- DROP TABLE IF EXISTS zfgbb.board;
-
-CREATE TABLE IF NOT EXISTS zfgbb.board
-(
- board_id integer NOT NULL DEFAULT nextval('zfgbb.board_board_id_seq'::regclass),
- board_name character varying(32) COLLATE pg_catalog."default" NOT NULL,
- description character varying(64) COLLATE pg_catalog."default",
- parent_id integer,
- created_ts timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
- updated_ts timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
- category_id integer NOT NULL,
- CONSTRAINT board_pkey PRIMARY KEY (board_id),
- CONSTRAINT fk_board_category_id FOREIGN KEY (category_id)
- REFERENCES zfgbb.category (category_id) MATCH SIMPLE
- ON UPDATE NO ACTION
- ON DELETE NO ACTION
- NOT VALID,
- CONSTRAINT fk_board_parent_id FOREIGN KEY (parent_id)
- REFERENCES zfgbb.board (board_id) MATCH FULL
- ON UPDATE NO ACTION
- ON DELETE NO ACTION
-)
-WITH (
- OIDS = FALSE
-)
-TABLESPACE pg_default;
-
-ALTER TABLE IF EXISTS zfgbb.board
- OWNER to zfgcadmin;
--- Index: fki_fk_board_parent_id
-
--- DROP INDEX IF EXISTS zfgbb.fki_fk_board_parent_id;
-
-CREATE INDEX IF NOT EXISTS fki_fk_board_parent_id
- ON zfgbb.board USING btree
- (parent_id ASC NULLS LAST)
+-- Table: zfgbb.board
+
+-- DROP TABLE IF EXISTS zfgbb.board;
+
+CREATE TABLE IF NOT EXISTS zfgbb.board
+(
+ board_id integer NOT NULL DEFAULT nextval('zfgbb.board_board_id_seq'::regclass),
+ board_name character varying(32) COLLATE pg_catalog."default" NOT NULL,
+ description character varying(64) COLLATE pg_catalog."default",
+ parent_id integer,
+ created_ts timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
+ updated_ts timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
+ category_id integer NOT NULL,
+ CONSTRAINT board_pkey PRIMARY KEY (board_id),
+ CONSTRAINT fk_board_category_id FOREIGN KEY (category_id)
+ REFERENCES zfgbb.category (category_id) MATCH SIMPLE
+ ON UPDATE NO ACTION
+ ON DELETE NO ACTION
+ NOT VALID,
+ CONSTRAINT fk_board_parent_id FOREIGN KEY (parent_id)
+ REFERENCES zfgbb.board (board_id) MATCH FULL
+ ON UPDATE NO ACTION
+ ON DELETE NO ACTION
+)
+WITH (
+ OIDS = FALSE
+)
+TABLESPACE pg_default;
+
+ALTER TABLE IF EXISTS zfgbb.board
+ OWNER to zfgcadmin;
+-- Index: fki_fk_board_parent_id
+
+-- DROP INDEX IF EXISTS zfgbb.fki_fk_board_parent_id;
+
+CREATE INDEX IF NOT EXISTS fki_fk_board_parent_id
+ ON zfgbb.board USING btree
+ (parent_id ASC NULLS LAST)
TABLESPACE pg_default;
\ No newline at end of file
diff --git a/src/main/database/tables/CATEGORY.sql b/src/main/database/tables/CATEGORY.sql
index 0a8ff08..d355d90 100644
--- a/src/main/database/tables/CATEGORY.sql
+++ b/src/main/database/tables/CATEGORY.sql
@@ -1,20 +1,20 @@
--- Table: zfgbb.category
-
--- DROP TABLE IF EXISTS zfgbb.category;
-
-CREATE TABLE IF NOT EXISTS zfgbb.category
-(
- category_id integer NOT NULL DEFAULT nextval('zfgbb.forum_forum_id_seq'::regclass),
- category_name character varying(32) COLLATE pg_catalog."default" NOT NULL,
- descriptipn character varying(64) COLLATE pg_catalog."default",
- created_ts timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
- updated_ts timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
- CONSTRAINT forum_pkey PRIMARY KEY (category_id)
-)
-WITH (
- OIDS = FALSE
-)
-TABLESPACE pg_default;
-
-ALTER TABLE IF EXISTS zfgbb.category
+-- Table: zfgbb.category
+
+-- DROP TABLE IF EXISTS zfgbb.category;
+
+CREATE TABLE IF NOT EXISTS zfgbb.category
+(
+ category_id integer NOT NULL DEFAULT nextval('zfgbb.forum_forum_id_seq'::regclass),
+ category_name character varying(32) COLLATE pg_catalog."default" NOT NULL,
+ descriptipn character varying(64) COLLATE pg_catalog."default",
+ created_ts timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
+ updated_ts timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
+ CONSTRAINT forum_pkey PRIMARY KEY (category_id)
+)
+WITH (
+ OIDS = FALSE
+)
+TABLESPACE pg_default;
+
+ALTER TABLE IF EXISTS zfgbb.category
OWNER to zfgcdev;
\ No newline at end of file
diff --git a/src/main/database/views/BOARD_PERMISSION_VIEW.sql b/src/main/database/views/BOARD_PERMISSION_VIEW.sql
index 6a7b30a..48e0829 100644
--- a/src/main/database/views/BOARD_PERMISSION_VIEW.sql
+++ b/src/main/database/views/BOARD_PERMISSION_VIEW.sql
@@ -1,8 +1,8 @@
-create or replace view board_permission_view as
-select b.board_id,
- p.permission_id,
- p.permission_code,
- p.permission_name
-from zfgbb.br_board_permission br
-join zfgbb.permission p on p.permission_id = br.permission_id
+create or replace view board_permission_view as
+select b.board_id,
+ p.permission_id,
+ p.permission_code,
+ p.permission_name
+from zfgbb.br_board_permission br
+join zfgbb.permission p on p.permission_id = br.permission_id
join zfgbb.board b on b.board_id = br.board_id
\ No newline at end of file
diff --git a/src/main/database/views/CURRENT_MESSAGE_VIEW.sql b/src/main/database/views/CURRENT_MESSAGE_VIEW.sql
index 6f79475..f419978 100644
--- a/src/main/database/views/CURRENT_MESSAGE_VIEW.sql
+++ b/src/main/database/views/CURRENT_MESSAGE_VIEW.sql
@@ -4,6 +4,7 @@ select m.message_id,
m.thread_id,
h.message_text,
h.message_history_id,
- m.post_in_thread
+ m.post_in_thread,
+ h.created_ts
from zfgbb.message m
join zfgbb.message_history h on h.message_id = m.message_id and h.current_flag = true
diff --git a/src/main/database/views/USER_PERMISSION_VIEW.sql b/src/main/database/views/USER_PERMISSION_VIEW.sql
index 6656482..465b8d3 100644
--- a/src/main/database/views/USER_PERMISSION_VIEW.sql
+++ b/src/main/database/views/USER_PERMISSION_VIEW.sql
@@ -1,5 +1,5 @@
-SELECT u.user_id,
- p.permission_id,
- p.permission_code
-FROM zfgbb.br_user_permission u
+SELECT u.user_id,
+ p.permission_id,
+ p.permission_code
+FROM zfgbb.br_user_permission u
JOIN zfgbb.permission p ON p.permission_id = u.user_permission_id
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/ServletInitializer.java b/src/main/java/com/zfgc/zfgbb/ServletInitializer.java
index 0ec06ae..23b512f 100644
--- a/src/main/java/com/zfgc/zfgbb/ServletInitializer.java
+++ b/src/main/java/com/zfgc/zfgbb/ServletInitializer.java
@@ -1,13 +1,13 @@
-package com.zfgc.zfgbb;
-
-import org.springframework.boot.builder.SpringApplicationBuilder;
-import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
-
-public class ServletInitializer extends SpringBootServletInitializer {
-
- @Override
- protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
- return application.sources(ZfgbbApplication.class);
- }
-
-}
+package com.zfgc.zfgbb;
+
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+
+public class ServletInitializer extends SpringBootServletInitializer {
+
+ @Override
+ protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
+ return application.sources(ZfgbbApplication.class);
+ }
+
+}
diff --git a/src/main/java/com/zfgc/zfgbb/ZfgbbApplication.java b/src/main/java/com/zfgc/zfgbb/ZfgbbApplication.java
index 901c273..61381e4 100644
--- a/src/main/java/com/zfgc/zfgbb/ZfgbbApplication.java
+++ b/src/main/java/com/zfgc/zfgbb/ZfgbbApplication.java
@@ -12,13 +12,14 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
+import org.springframework.security.config.annotation.method.configuration.EnableMethodSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@SpringBootApplication
@MapperScan("com.zfgc.zfgbb.mappers")
-@EnableGlobalMethodSecurity(prePostEnabled = true)
+@EnableMethodSecurity(prePostEnabled = true)
public class ZfgbbApplication {
public static void main(String[] args) {
diff --git a/src/main/java/com/zfgc/zfgbb/config/annotations/BbService.java b/src/main/java/com/zfgc/zfgbb/config/annotations/BbService.java
index 86eb52e..4928301 100644
--- a/src/main/java/com/zfgc/zfgbb/config/annotations/BbService.java
+++ b/src/main/java/com/zfgc/zfgbb/config/annotations/BbService.java
@@ -1,10 +1,10 @@
-package com.zfgc.zfgbb.config.annotations;
-
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-@Service
-@Transactional
-public @interface BbService {
-
-}
+package com.zfgc.zfgbb.config.annotations;
+
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+@Service
+@Transactional
+public @interface BbService {
+
+}
diff --git a/src/main/java/com/zfgc/zfgbb/config/loadoption/BaseLoadOption.java b/src/main/java/com/zfgc/zfgbb/config/loadoption/BaseLoadOption.java
new file mode 100644
index 0000000..4e20b61
--- /dev/null
+++ b/src/main/java/com/zfgc/zfgbb/config/loadoption/BaseLoadOption.java
@@ -0,0 +1,6 @@
+package com.zfgc.zfgbb.config.loadoption;
+
+
+public class BaseLoadOption {
+
+}
diff --git a/src/main/java/com/zfgc/zfgbb/config/loadoption/user/BasicUserLoadOptions.java b/src/main/java/com/zfgc/zfgbb/config/loadoption/user/BasicUserLoadOptions.java
new file mode 100644
index 0000000..2b1d7ab
--- /dev/null
+++ b/src/main/java/com/zfgc/zfgbb/config/loadoption/user/BasicUserLoadOptions.java
@@ -0,0 +1,18 @@
+package com.zfgc.zfgbb.config.loadoption.user;
+
+import com.zfgc.zfgbb.config.loadoption.BaseLoadOption;
+
+public class BasicUserLoadOptions extends BaseLoadOption {
+
+ public boolean loadAvatar() {
+ return true;
+ }
+
+ public boolean loadBio() {
+ return true;
+ }
+
+ public boolean loadPermissions() {
+ return false;
+ }
+}
diff --git a/src/main/java/com/zfgc/zfgbb/config/loadoption/user/FullUserLoadOptions.java b/src/main/java/com/zfgc/zfgbb/config/loadoption/user/FullUserLoadOptions.java
new file mode 100644
index 0000000..3ce9529
--- /dev/null
+++ b/src/main/java/com/zfgc/zfgbb/config/loadoption/user/FullUserLoadOptions.java
@@ -0,0 +1,13 @@
+package com.zfgc.zfgbb.config.loadoption.user;
+
+public class FullUserLoadOptions extends BasicUserLoadOptions {
+ @Override
+ public boolean loadBio() {
+ return true;
+ }
+
+ @Override
+ public boolean loadPermissions() {
+ return true;
+ }
+}
diff --git a/src/main/java/com/zfgc/zfgbb/config/loadoption/user/LoggedInUserLoadOptions.java b/src/main/java/com/zfgc/zfgbb/config/loadoption/user/LoggedInUserLoadOptions.java
new file mode 100644
index 0000000..d132c2d
--- /dev/null
+++ b/src/main/java/com/zfgc/zfgbb/config/loadoption/user/LoggedInUserLoadOptions.java
@@ -0,0 +1,16 @@
+package com.zfgc.zfgbb.config.loadoption.user;
+
+public class LoggedInUserLoadOptions extends BasicUserLoadOptions {
+
+ public boolean loadAvatar() {
+ return false;
+ }
+
+ public boolean loadBio() {
+ return false;
+ }
+
+ public boolean loadPermissions() {
+ return true;
+ }
+}
diff --git a/src/main/java/com/zfgc/zfgbb/config/security/Oauth2AuthorizationFilter.java b/src/main/java/com/zfgc/zfgbb/config/security/Oauth2AuthorizationFilter.java
index a03bc1b..d6f213e 100644
--- a/src/main/java/com/zfgc/zfgbb/config/security/Oauth2AuthorizationFilter.java
+++ b/src/main/java/com/zfgc/zfgbb/config/security/Oauth2AuthorizationFilter.java
@@ -1,50 +1,50 @@
-package com.zfgc.zfgbb.config.security;
-
-import java.io.IOException;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
-import org.springframework.security.core.context.SecurityContext;
-import org.springframework.security.core.context.SecurityContextHolder;
-import org.springframework.security.core.userdetails.UserDetails;
-import org.springframework.security.oauth2.jwt.Jwt;
-import org.springframework.web.filter.GenericFilterBean;
-
-import com.zfgc.zfgbb.util.ZfgcSecurityUtils;
-
-import jakarta.servlet.FilterChain;
-import jakarta.servlet.ServletException;
-import jakarta.servlet.ServletRequest;
-import jakarta.servlet.ServletResponse;
-
-public class Oauth2AuthorizationFilter extends GenericFilterBean {
-
- @Autowired
- private OauthUsersDetailsServiceImpl oauthUsersDetailsServiceImpl;
-
- public Oauth2AuthorizationFilter (OauthUsersDetailsServiceImpl userDetailsService) {
- this.oauthUsersDetailsServiceImpl = userDetailsService;
- }
-
-
- @Override
- public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
- throws IOException, ServletException {
-
- SecurityContext context = SecurityContextHolder.getContext();
- if(context.getAuthentication() != null && context.getAuthentication().getPrincipal() instanceof Jwt) {
-
- //check here what authority user came from and transform to an sso key here
- //for now we only support clausius auth, but facebook and google are to come
- //String ssoKey = "CLAUSIUS:" + ZfgcSecurityUtils.generateMd5(((Jwt)context.getAuthentication().getPrincipal()).getClaimAsString("user_name"));
- String userName = ((Jwt)context.getAuthentication().getPrincipal()).getClaimAsString("user_name");
-
- UserDetails user = oauthUsersDetailsServiceImpl.loadUserByUsername(userName);
- UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(user, null, user.getAuthorities());
- context.setAuthentication(authentication);
- }
-
- chain.doFilter(request, response);
- }
-
+package com.zfgc.zfgbb.config.security;
+
+import java.io.IOException;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
+import org.springframework.security.core.context.SecurityContext;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.oauth2.jwt.Jwt;
+import org.springframework.web.filter.GenericFilterBean;
+
+import com.zfgc.zfgbb.util.ZfgcSecurityUtils;
+
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+
+public class Oauth2AuthorizationFilter extends GenericFilterBean {
+
+ @Autowired
+ private OauthUsersDetailsServiceImpl oauthUsersDetailsServiceImpl;
+
+ public Oauth2AuthorizationFilter (OauthUsersDetailsServiceImpl userDetailsService) {
+ this.oauthUsersDetailsServiceImpl = userDetailsService;
+ }
+
+
+ @Override
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
+ throws IOException, ServletException {
+
+ SecurityContext context = SecurityContextHolder.getContext();
+ if(context.getAuthentication() != null && context.getAuthentication().getPrincipal() instanceof Jwt) {
+
+ //check here what authority user came from and transform to an sso key here
+ //for now we only support clausius auth, but facebook and google are to come
+ //String ssoKey = "CLAUSIUS:" + ZfgcSecurityUtils.generateMd5(((Jwt)context.getAuthentication().getPrincipal()).getClaimAsString("user_name"));
+ String userName = ((Jwt)context.getAuthentication().getPrincipal()).getClaimAsString("user_name");
+
+ UserDetails user = oauthUsersDetailsServiceImpl.loadUserByUsername(userName);
+ UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(user, null, user.getAuthorities());
+ context.setAuthentication(authentication);
+ }
+
+ chain.doFilter(request, response);
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/config/security/OauthUsersDetailsServiceImpl.java b/src/main/java/com/zfgc/zfgbb/config/security/OauthUsersDetailsServiceImpl.java
index 67e0501..2100038 100644
--- a/src/main/java/com/zfgc/zfgbb/config/security/OauthUsersDetailsServiceImpl.java
+++ b/src/main/java/com/zfgc/zfgbb/config/security/OauthUsersDetailsServiceImpl.java
@@ -1,65 +1,65 @@
-package com.zfgc.zfgbb.config.security;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
-import org.springframework.security.core.userdetails.UserDetails;
-import org.springframework.security.core.userdetails.UserDetailsService;
-import org.springframework.security.core.userdetails.UsernameNotFoundException;
-import org.springframework.stereotype.Service;
-import org.springframework.web.client.RestTemplate;
-
-import com.zfgc.zfgbb.dao.users.EmailAddressDao;
-import com.zfgc.zfgbb.dao.users.UserDao;
-import com.zfgc.zfgbb.dao.UserPermissionViewDao;
-import com.zfgc.zfgbb.dataprovider.users.UserDataProvider;
-import com.zfgc.zfgbb.dbo.EmailAddressDboExample;
-import com.zfgc.zfgbb.dbo.UserDbo;
-import com.zfgc.zfgbb.dbo.UserDboExample;
-import com.zfgc.zfgbb.dbo.UserPermissionViewDboExample;
-import com.zfgc.zfgbb.model.User;
-import com.zfgc.zfgbb.model.users.AuthCredentials;
-
-@Service
-public class OauthUsersDetailsServiceImpl implements UserDetailsService{
-
- @Value("${clausius.client}")
- private String clientId;
-
- @Value("${clausius.password}")
- private String clientSecret;
-
- @Value("${clausius.authEndpoint}")
- private String authEndpoint;
-
- @Autowired
- private UserDataProvider userDataProvider;
-
- @Override
- public UserDetails loadUserByUsername(String ssoKey) throws UsernameNotFoundException {
- return userDataProvider.getUser(ssoKey);
- }
-
- public String getLoginToken(AuthCredentials credentials) {
- RestTemplate template = new RestTemplate();
- HttpHeaders headers = new HttpHeaders();
- headers.setBasicAuth(clientId, clientSecret);
- headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
-
- //todo: move these paramters into the request body
- HttpEntity ent = new HttpEntity("grant_type=password&scope=all&username=" + credentials.getUsername() + "&password=" + credentials.getPassword(), headers);
-
- ResponseEntity result = template.exchange(authEndpoint + "/oauth/token", HttpMethod.POST, ent, String.class);
- return result.getBody();
- }
-
-
-
+package com.zfgc.zfgbb.config.security;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.core.userdetails.UserDetailsService;
+import org.springframework.security.core.userdetails.UsernameNotFoundException;
+import org.springframework.stereotype.Service;
+import org.springframework.web.client.RestTemplate;
+
+import com.zfgc.zfgbb.dao.users.EmailAddressDao;
+import com.zfgc.zfgbb.dao.users.UserDao;
+import com.zfgc.zfgbb.dao.UserPermissionViewDao;
+import com.zfgc.zfgbb.dataprovider.users.UserDataProvider;
+import com.zfgc.zfgbb.dbo.EmailAddressDboExample;
+import com.zfgc.zfgbb.dbo.UserDbo;
+import com.zfgc.zfgbb.dbo.UserDboExample;
+import com.zfgc.zfgbb.dbo.UserPermissionViewDboExample;
+import com.zfgc.zfgbb.model.User;
+import com.zfgc.zfgbb.model.users.AuthCredentials;
+
+@Service
+public class OauthUsersDetailsServiceImpl implements UserDetailsService{
+
+ @Value("${clausius.client}")
+ private String clientId;
+
+ @Value("${clausius.password}")
+ private String clientSecret;
+
+ @Value("${clausius.authEndpoint}")
+ private String authEndpoint;
+
+ @Autowired
+ private UserDataProvider userDataProvider;
+
+ @Override
+ public UserDetails loadUserByUsername(String ssoKey) throws UsernameNotFoundException {
+ return userDataProvider.getUser(ssoKey);
+ }
+
+ public String getLoginToken(AuthCredentials credentials) {
+ RestTemplate template = new RestTemplate();
+ HttpHeaders headers = new HttpHeaders();
+ headers.setBasicAuth(clientId, clientSecret);
+ headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
+
+ //todo: move these paramters into the request body
+ HttpEntity ent = new HttpEntity("grant_type=password&scope=all&username=" + credentials.getUsername() + "&password=" + credentials.getPassword(), headers);
+
+ ResponseEntity result = template.exchange(authEndpoint + "/oauth/token", HttpMethod.POST, ent, String.class);
+ return result.getBody();
+ }
+
+
+
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/config/security/SecurityConfig.java b/src/main/java/com/zfgc/zfgbb/config/security/SecurityConfig.java
index 4d674fc..75ad3a1 100644
--- a/src/main/java/com/zfgc/zfgbb/config/security/SecurityConfig.java
+++ b/src/main/java/com/zfgc/zfgbb/config/security/SecurityConfig.java
@@ -1,56 +1,56 @@
-package com.zfgc.zfgbb.config.security;
-
-import javax.crypto.spec.SecretKeySpec;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.security.config.Customizer;
-import org.springframework.security.config.annotation.web.builders.HttpSecurity;
-import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
-import org.springframework.security.config.annotation.web.configurers.HttpBasicConfigurer;
-import org.springframework.security.oauth2.jwt.NimbusJwtDecoder;
-import org.springframework.security.web.SecurityFilterChain;
-import org.springframework.security.web.authentication.switchuser.SwitchUserFilter;
-
-@Configuration
-@EnableWebSecurity
-public class SecurityConfig{
-
- // userDetailsService bean
- @Autowired
- private OauthUsersDetailsServiceImpl oauthUsersDetailsServiceImpl;
-
- @Value("${clausius.auth.key}")
- private String authKey;
-
- @Bean
- public Oauth2AuthorizationFilter jwtAuthTokenFilterBean() throws Exception {
- return new Oauth2AuthorizationFilter(oauthUsersDetailsServiceImpl);
- }
-
-
-
- @Bean
- public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
- //test key for now
- SecretKeySpec key = new SecretKeySpec(authKey.getBytes(), "HMACSHA256");
-
- http.httpBasic(httpBasic -> httpBasic.disable())
- .csrf(csrf -> csrf.disable())
- .authorizeHttpRequests(req -> req.requestMatchers("//*.map", "/**").permitAll())
- .authorizeHttpRequests(req -> req.anyRequest().authenticated())
- .oauth2ResourceServer(oauth -> oauth.jwt(jwt -> jwt.decoder(NimbusJwtDecoder.withSecretKey(key).build())));
-
- /*http.httpBasic().disable().csrf().disable().authorizeRequests().requestMatchers("//*.map",
- "/**").permitAll().and().authorizeRequests().anyRequest().authenticated().and()
- .oauth2ResourceServer().jwt().decoder(NimbusJwtDecoder.withSecretKey(key).build());*/
-
- http.addFilterAfter(jwtAuthTokenFilterBean(), SwitchUserFilter.class);
- return http.build();
-
- }
-
-
+package com.zfgc.zfgbb.config.security;
+
+import javax.crypto.spec.SecretKeySpec;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.Customizer;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+import org.springframework.security.config.annotation.web.configurers.HttpBasicConfigurer;
+import org.springframework.security.oauth2.jwt.NimbusJwtDecoder;
+import org.springframework.security.web.SecurityFilterChain;
+import org.springframework.security.web.authentication.switchuser.SwitchUserFilter;
+
+@Configuration
+@EnableWebSecurity
+public class SecurityConfig{
+
+ // userDetailsService bean
+ @Autowired
+ private OauthUsersDetailsServiceImpl oauthUsersDetailsServiceImpl;
+
+ @Value("${clausius.auth.key}")
+ private String authKey;
+
+ @Bean
+ public Oauth2AuthorizationFilter jwtAuthTokenFilterBean() throws Exception {
+ return new Oauth2AuthorizationFilter(oauthUsersDetailsServiceImpl);
+ }
+
+
+
+ @Bean
+ public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
+ //test key for now
+ SecretKeySpec key = new SecretKeySpec(authKey.getBytes(), "HMACSHA256");
+
+ http.httpBasic(httpBasic -> httpBasic.disable())
+ .csrf(csrf -> csrf.disable())
+ .authorizeHttpRequests(req -> req.requestMatchers("//*.map", "/**").permitAll())
+ .authorizeHttpRequests(req -> req.anyRequest().authenticated())
+ .oauth2ResourceServer(oauth -> oauth.jwt(jwt -> jwt.decoder(NimbusJwtDecoder.withSecretKey(key).build())));
+
+ /*http.httpBasic().disable().csrf().disable().authorizeRequests().requestMatchers("//*.map",
+ "/**").permitAll().and().authorizeRequests().anyRequest().authenticated().and()
+ .oauth2ResourceServer().jwt().decoder(NimbusJwtDecoder.withSecretKey(key).build());*/
+
+ http.addFilterAfter(jwtAuthTokenFilterBean(), SwitchUserFilter.class);
+ return http.build();
+
+ }
+
+
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/controller/BaseController.java b/src/main/java/com/zfgc/zfgbb/controller/BaseController.java
index 4c448d0..6407716 100644
--- a/src/main/java/com/zfgc/zfgbb/controller/BaseController.java
+++ b/src/main/java/com/zfgc/zfgbb/controller/BaseController.java
@@ -33,6 +33,7 @@ private User createGuest() {
guest.setUserId(-1);
guestPerm.setId(2);
guestPerm.setPermissionCode("ZFGC_GUEST");
+
guest.getPermissions().add(guestPerm);
return guest;
diff --git a/src/main/java/com/zfgc/zfgbb/controller/ContentController.java b/src/main/java/com/zfgc/zfgbb/controller/ContentController.java
new file mode 100644
index 0000000..72d0295
--- /dev/null
+++ b/src/main/java/com/zfgc/zfgbb/controller/ContentController.java
@@ -0,0 +1,36 @@
+package com.zfgc.zfgbb.controller;
+
+import java.net.MalformedURLException;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.io.Resource;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.zfgc.zfgbb.services.core.ContentService;
+
+@RestController
+@RequestMapping("/content")
+public class ContentController extends BaseController {
+
+ @Autowired
+ private ContentService contentService;
+
+ @GetMapping("image/{resourceId}")
+ public ResponseEntity getImageResource(@PathVariable("resourceId") Integer resourceId) throws MalformedURLException {
+ return prepareResource(contentService.getImageResource(resourceId));
+ }
+
+ private ResponseEntity prepareResource(Resource resource) {
+ return ResponseEntity.ok()
+ .contentType(MediaType.IMAGE_GIF)
+ .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + resource.getFilename() + "\"")
+ .body(resource);
+ }
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/controller/TestController.java b/src/main/java/com/zfgc/zfgbb/controller/TestController.java
index ab2663d..3d96273 100644
--- a/src/main/java/com/zfgc/zfgbb/controller/TestController.java
+++ b/src/main/java/com/zfgc/zfgbb/controller/TestController.java
@@ -1,17 +1,17 @@
-package com.zfgc.zfgbb.controller;
-
-import org.springframework.http.ResponseEntity;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-@RestController
-public class TestController extends BaseController {
-
- @GetMapping("/")
- public ResponseEntity test() {
- zfgcUser();
- return ResponseEntity.ok().build();
- }
-
+package com.zfgc.zfgbb.controller;
+
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+public class TestController extends BaseController {
+
+ @GetMapping("/")
+ public ResponseEntity test() {
+ zfgcUser();
+ return ResponseEntity.ok().build();
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/controller/UserController.java b/src/main/java/com/zfgc/zfgbb/controller/UserController.java
index aacefb7..4e73f54 100644
--- a/src/main/java/com/zfgc/zfgbb/controller/UserController.java
+++ b/src/main/java/com/zfgc/zfgbb/controller/UserController.java
@@ -1,48 +1,48 @@
-package com.zfgc.zfgbb.controller;
-
-import java.util.Base64;
-
-import org.apache.commons.lang3.StringUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.ResponseEntity;
-import org.springframework.web.bind.annotation.GetMapping;
-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.RequestMethod;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.zfgc.zfgbb.config.security.OauthUsersDetailsServiceImpl;
-import com.zfgc.zfgbb.model.User;
-import com.zfgc.zfgbb.model.users.AuthCredentials;
-import com.zfgc.zfgbb.services.core.UserService;
-
-@RestController
-@RequestMapping("/users")
-public class UserController extends BaseController {
-
- @Autowired
- private OauthUsersDetailsServiceImpl oauthService;
-
- @Autowired
- private UserService userService;
-
- @GetMapping("/loggedInUser")
- public ResponseEntity getLoggedInUser() {
- return ResponseEntity.ok(zfgcUser());
- }
-
- @PostMapping("auth/login")
- public ResponseEntity login(@RequestBody AuthCredentials credentials) {
- String result = oauthService.getLoginToken(credentials);
- return ResponseEntity.status(HttpStatus.OK).body(result);
-
- }
-
- @PostMapping("/register")
- public ResponseEntity registerNewUser(@RequestBody User user) {
- return ResponseEntity.status(HttpStatus.OK).body(userService.createNewUser(user));
- }
+package com.zfgc.zfgbb.controller;
+
+import java.util.Base64;
+
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.GetMapping;
+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.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.zfgc.zfgbb.config.security.OauthUsersDetailsServiceImpl;
+import com.zfgc.zfgbb.model.User;
+import com.zfgc.zfgbb.model.users.AuthCredentials;
+import com.zfgc.zfgbb.services.core.UserService;
+
+@RestController
+@RequestMapping("/users")
+public class UserController extends BaseController {
+
+ @Autowired
+ private OauthUsersDetailsServiceImpl oauthService;
+
+ @Autowired
+ private UserService userService;
+
+ @GetMapping("/loggedInUser")
+ public ResponseEntity getLoggedInUser() {
+ return ResponseEntity.ok(zfgcUser());
+ }
+
+ @PostMapping("auth/login")
+ public ResponseEntity login(@RequestBody AuthCredentials credentials) {
+ String result = oauthService.getLoginToken(credentials);
+ return ResponseEntity.status(HttpStatus.OK).body(result);
+
+ }
+
+ @PostMapping("/register")
+ public ResponseEntity registerNewUser(@RequestBody User user) {
+ return ResponseEntity.status(HttpStatus.OK).body(userService.createNewUser(user));
+ }
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/controller/forum/BoardController.java b/src/main/java/com/zfgc/zfgbb/controller/forum/BoardController.java
index 65f423f..ccae342 100644
--- a/src/main/java/com/zfgc/zfgbb/controller/forum/BoardController.java
+++ b/src/main/java/com/zfgc/zfgbb/controller/forum/BoardController.java
@@ -6,6 +6,7 @@
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.zfgc.zfgbb.controller.BaseController;
@@ -20,7 +21,12 @@ public class BoardController extends BaseController {
private ForumService forumService;
@GetMapping("/{boardId}")
- public ResponseEntity getBoard(@PathVariable("boardId") Integer boardId) {
- return ResponseEntity.ok(forumService.getForum(boardId, super.zfgcUser()));
+ public ResponseEntity getBoard(@PathVariable("boardId") Integer boardId, @RequestParam(name="pageNo",required=false) Integer pageNo) {
+ return ResponseEntity.ok(forumService.getBoard(boardId, pageNo, super.zfgcUser()));
+ }
+
+ @GetMapping("/forum")
+ public ResponseEntity getForum() {
+ return ResponseEntity.ok(forumService.getForum(super.zfgcUser()));
}
}
diff --git a/src/main/java/com/zfgc/zfgbb/controller/forum/MessageController.java b/src/main/java/com/zfgc/zfgbb/controller/forum/MessageController.java
index cebbf3b..dba13a6 100644
--- a/src/main/java/com/zfgc/zfgbb/controller/forum/MessageController.java
+++ b/src/main/java/com/zfgc/zfgbb/controller/forum/MessageController.java
@@ -1,39 +1,39 @@
-package com.zfgc.zfgbb.controller.forum;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.ResponseEntity;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-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.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.zfgc.zfgbb.controller.BaseController;
-import com.zfgc.zfgbb.model.forum.Message;
-import com.zfgc.zfgbb.model.forum.Thread;
-import com.zfgc.zfgbb.services.forum.ForumService;
-
-@RestController
-@RequestMapping("/message")
-public class MessageController extends BaseController {
-
- @Autowired
- private ForumService forumService;
-
- @GetMapping("/template")
- //@PreAuthorize("hasRole('ROLE_ZFGC_THREAD_CREATOR')")
- public ResponseEntity getMessageTemplate(@RequestParam("threadId") Integer threadId, Thread thread) {
- Message template = forumService.getMessageTemplate(thread.getBoardId(), thread.getThreadId(), null, super.zfgcUser());
- return ResponseEntity.ok(template);
- }
-
- @PostMapping("/{threadId}")
- //@PreAuthorize("hasRole('ROLE_ZFGC_THREAD_POSTER')")
- public ResponseEntity addMessageToThread(@PathVariable("threadId") Integer threadId, @RequestBody Message message) {
- return ResponseEntity.ok(forumService.saveMessage(message, super.zfgcUser()));
- }
-
+package com.zfgc.zfgbb.controller.forum;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+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.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.zfgc.zfgbb.controller.BaseController;
+import com.zfgc.zfgbb.model.forum.Message;
+import com.zfgc.zfgbb.model.forum.Thread;
+import com.zfgc.zfgbb.services.forum.ForumService;
+
+@RestController
+@RequestMapping("/message")
+public class MessageController extends BaseController {
+
+ @Autowired
+ private ForumService forumService;
+
+ @GetMapping("/template")
+ //@PreAuthorize("hasRole('ROLE_ZFGC_THREAD_CREATOR')")
+ public ResponseEntity getMessageTemplate(@RequestParam("threadId") Integer threadId, Thread thread) {
+ Message template = forumService.getMessageTemplate(thread.getBoardId(), thread.getThreadId(), null, super.zfgcUser());
+ return ResponseEntity.ok(template);
+ }
+
+ @PostMapping("/{threadId}")
+ //@PreAuthorize("hasRole('ROLE_ZFGC_THREAD_POSTER')")
+ public ResponseEntity addMessageToThread(@PathVariable("threadId") Integer threadId, @RequestBody Message message) {
+ return ResponseEntity.ok(forumService.saveMessage(message, super.zfgcUser()));
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/controller/forum/ThreadController.java b/src/main/java/com/zfgc/zfgbb/controller/forum/ThreadController.java
index b2023b7..8df2b70 100644
--- a/src/main/java/com/zfgc/zfgbb/controller/forum/ThreadController.java
+++ b/src/main/java/com/zfgc/zfgbb/controller/forum/ThreadController.java
@@ -1,81 +1,81 @@
-package com.zfgc.zfgbb.controller.forum;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.ResponseEntity;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.zfgc.zfgbb.model.forum.Message;
-import com.zfgc.zfgbb.model.forum.Thread;
-import com.zfgc.zfgbb.model.forum.ThreadSplit;
-import com.zfgc.zfgbb.controller.BaseController;
-import com.zfgc.zfgbb.services.forum.ForumService;
-
-@RestController
-@RequestMapping("/thread")
-public class ThreadController extends BaseController {
-
- @Autowired
- private ForumService forumService;
-
- @GetMapping("/template")
- public ResponseEntity getThreadTemplate(@RequestParam("boardId") Integer boardId) {
- Thread template = forumService.getThreadTemplate(boardId, super.zfgcUser());
- return ResponseEntity.ok(template);
- }
-
- @PostMapping
- public ResponseEntity saveThread(@RequestParam("boardId") Integer boardId, Thread thread) {
- Thread saved = forumService.saveThread(thread, super.zfgcUser());
- return ResponseEntity.ok(saved);
- }
-
- @GetMapping("/{threadId}")
- public ResponseEntity getThread(@PathVariable("threadId") Integer threadId, @RequestParam("numPerPage") Integer numPerPage, @RequestParam("pageNo") Integer pageNo) {
- return ResponseEntity.ok(forumService.getThread(threadId, pageNo, numPerPage, super.zfgcUser()));
- }
-
- @DeleteMapping("/{threadId}")
- @PreAuthorize("hasRole('ROLE_ZFGC_THREAD_DELETER')")
- public ResponseEntity deleteThread(@PathVariable("threadId") Integer threadId) {
- forumService.deleteThread(threadId, super.zfgcUser());
- return ResponseEntity.ok().build();
- }
-
- @PutMapping("/{threadId}/move/{boardId}")
- @PreAuthorize("hasRole('ROLE_ZFGC_THREAD_EDITOR')")
- public ResponseEntity moveThread(@PathVariable("threadId") Integer threadId, @PathVariable("boardId") Integer boardId) {
- return ResponseEntity.ok(forumService.moveThread(threadId, boardId, super.zfgcUser()));
- }
-
- @PutMapping("/{threadId}/lockToggle")
- @PreAuthorize("hasRole('ROLE_ZFGC_THREAD_EDITOR')")
- public ResponseEntity lockToggleThread(@PathVariable("threadId") Integer threadId) {
- return ResponseEntity.ok(forumService.toggleLocked(threadId, super.zfgcUser()));
- }
-
- @PutMapping("/{threadId}/stickyToggle")
- @PreAuthorize("hasRole('ROLE_ZFGC_THREAD_EDITOR')")
- public ResponseEntity stickyToggleThread(@PathVariable("threadId") Integer threadId) {
- return ResponseEntity.ok(forumService.toggleSticky(threadId, super.zfgcUser()));
- }
-
- @GetMapping("/{threadId}/split")
- @PreAuthorize("hasRole('ROLE_ZFGC_THREAD_EDITOR')")
- public ResponseEntity getThreadSplitTemplate(@PathVariable("threadId") Integer threadId) {
- return ResponseEntity.ok(forumService.getSplitTemplate(threadId, super.zfgcUser()));
- }
-
- @PostMapping("/{threadId}/split")
- @PreAuthorize("hasRole('ROLE_ZFGC_THREAD_EDITOR')")
- public ResponseEntity splitThread(@PathVariable("threadId") Integer threadId, ThreadSplit threadSplit) {
- return ResponseEntity.ok(forumService.splitThread(threadSplit, super.zfgcUser()));
- }
+package com.zfgc.zfgbb.controller.forum;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.zfgc.zfgbb.model.forum.Message;
+import com.zfgc.zfgbb.model.forum.Thread;
+import com.zfgc.zfgbb.model.forum.ThreadSplit;
+import com.zfgc.zfgbb.controller.BaseController;
+import com.zfgc.zfgbb.services.forum.ForumService;
+
+@RestController
+@RequestMapping("/thread")
+public class ThreadController extends BaseController {
+
+ @Autowired
+ private ForumService forumService;
+
+ @GetMapping("/template")
+ public ResponseEntity getThreadTemplate(@RequestParam("boardId") Integer boardId) {
+ Thread template = forumService.getThreadTemplate(boardId, super.zfgcUser());
+ return ResponseEntity.ok(template);
+ }
+
+ @PostMapping
+ public ResponseEntity saveThread(@RequestParam("boardId") Integer boardId, Thread thread) {
+ Thread saved = forumService.saveThread(thread, super.zfgcUser());
+ return ResponseEntity.ok(saved);
+ }
+
+ @GetMapping("/{threadId}")
+ public ResponseEntity getThread(@PathVariable("threadId") Integer threadId, @RequestParam("numPerPage") Integer numPerPage, @RequestParam("pageNo") Integer pageNo) {
+ return ResponseEntity.ok(forumService.getThread(threadId, pageNo, numPerPage, super.zfgcUser()));
+ }
+
+ @DeleteMapping("/{threadId}")
+ @PreAuthorize("hasRole('ROLE_ZFGC_THREAD_DELETER')")
+ public ResponseEntity deleteThread(@PathVariable("threadId") Integer threadId) {
+ forumService.deleteThread(threadId, super.zfgcUser());
+ return ResponseEntity.ok().build();
+ }
+
+ @PutMapping("/{threadId}/move/{boardId}")
+ @PreAuthorize("hasRole('ROLE_ZFGC_THREAD_EDITOR')")
+ public ResponseEntity moveThread(@PathVariable("threadId") Integer threadId, @PathVariable("boardId") Integer boardId) {
+ return ResponseEntity.ok(forumService.moveThread(threadId, boardId, super.zfgcUser()));
+ }
+
+ @PutMapping("/{threadId}/lockToggle")
+ @PreAuthorize("hasRole('ROLE_ZFGC_THREAD_EDITOR')")
+ public ResponseEntity lockToggleThread(@PathVariable("threadId") Integer threadId) {
+ return ResponseEntity.ok(forumService.toggleLocked(threadId, super.zfgcUser()));
+ }
+
+ @PutMapping("/{threadId}/stickyToggle")
+ @PreAuthorize("hasRole('ROLE_ZFGC_THREAD_EDITOR')")
+ public ResponseEntity stickyToggleThread(@PathVariable("threadId") Integer threadId) {
+ return ResponseEntity.ok(forumService.toggleSticky(threadId, super.zfgcUser()));
+ }
+
+ @GetMapping("/{threadId}/split")
+ @PreAuthorize("hasRole('ROLE_ZFGC_THREAD_EDITOR')")
+ public ResponseEntity getThreadSplitTemplate(@PathVariable("threadId") Integer threadId) {
+ return ResponseEntity.ok(forumService.getSplitTemplate(threadId, super.zfgcUser()));
+ }
+
+ @PostMapping("/{threadId}/split")
+ @PreAuthorize("hasRole('ROLE_ZFGC_THREAD_EDITOR')")
+ public ResponseEntity splitThread(@PathVariable("threadId") Integer threadId, ThreadSplit threadSplit) {
+ return ResponseEntity.ok(forumService.splitThread(threadSplit, super.zfgcUser()));
+ }
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/controller/forum/UserProfileController.java b/src/main/java/com/zfgc/zfgbb/controller/forum/UserProfileController.java
index 692e62e..b9f2239 100644
--- a/src/main/java/com/zfgc/zfgbb/controller/forum/UserProfileController.java
+++ b/src/main/java/com/zfgc/zfgbb/controller/forum/UserProfileController.java
@@ -1,27 +1,36 @@
-package com.zfgc.zfgbb.controller.forum;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.ResponseEntity;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import com.zfgc.zfgbb.controller.BaseController;
-import com.zfgc.zfgbb.services.core.UserService;
-
-@RestController
-@RequestMapping("/user-profile")
-public class UserProfileController extends BaseController {
-
- @Autowired
- private UserService userService;
-
- @GetMapping("/{userId}")
- @PreAuthorize("hasRole('ROLE_ZFGC_PROFILE_VIEWER')")
- public ResponseEntity getUserProfile(@PathVariable("userId") Integer userId) {
- return ResponseEntity.ok(userService.loadUser(userId));
- }
-
+package com.zfgc.zfgbb.controller.forum;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+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 com.zfgc.zfgbb.controller.BaseController;
+import com.zfgc.zfgbb.model.User;
+import com.zfgc.zfgbb.services.core.UserService;
+
+@RestController
+@RequestMapping("/user-profile")
+public class UserProfileController extends BaseController {
+
+ @Autowired
+ private UserService userService;
+
+ @GetMapping("/{userId}")
+ //@PreAuthorize("hasAnyRole('ROLE_ZFGC_PROFILE_VIEWER','ROLE_ZFGC_PROFILE_EDITOR','ROLE_ZFGC_PROFILE_ADMIN')")
+ public ResponseEntity getUserProfile(@PathVariable("userId") Integer userId) {
+ return ResponseEntity.ok(userService.loadUser(userId));
+ }
+
+ @PostMapping("/{userId}")
+ @PreAuthorize("hasAnyRole('ROLE_ZFGC_PROFILE_EDITOR','ROLE_ZFGC_PROFILE_ADMIN')")
+ public ResponseEntity saveUserProfile(@PathVariable("userId") Integer userId, @RequestBody User user) {
+ return ResponseEntity.ok(userService.saveUserProfile(user, zfgcUser()));
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dao/AbstractDao.java b/src/main/java/com/zfgc/zfgbb/dao/AbstractDao.java
index 91776e9..9b67b5a 100644
--- a/src/main/java/com/zfgc/zfgbb/dao/AbstractDao.java
+++ b/src/main/java/com/zfgc/zfgbb/dao/AbstractDao.java
@@ -1,48 +1,48 @@
-package com.zfgc.zfgbb.dao;
-
-import java.util.ConcurrentModificationException;
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-
-import com.zfgc.zfgbb.dbo.AbstractDbo;
-
-public abstract class AbstractDao {
-
- protected DbMapper mapper;
- public abstract Dbo get(Integer id);
- public abstract List get(DbExample ex);
-
- public AbstractDao(DbMapper mapper) {
- this.mapper = mapper;
- }
-
- public Dbo save(Dbo toSave) {
-
- if(toSave.getPkId() == null) {
- create(toSave);
- }
- else {
- //get record from database
- Dbo existing = get(toSave.getPkId());
- if(existing.getUpdatedTime().isAfter(toSave.getUpdatedTime())) {
- //concurrency problem, get this garbo outta here
- throw new ConcurrentModificationException();
- }
-
- update(toSave);
- }
-
- //return the most up to date version of the record
- return get(toSave.getPkId());
- }
-
- public DbMapper getMapper() {
- return mapper;
- }
-
- protected abstract void update(Dbo toSave);
- protected abstract void create(Dbo toCreate);
- public void delete(DbExample id) { throw new RuntimeException("delete not supported"); }
-
+package com.zfgc.zfgbb.dao;
+
+import java.util.ConcurrentModificationException;
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+
+import com.zfgc.zfgbb.dbo.AbstractDbo;
+
+public abstract class AbstractDao {
+
+ protected DbMapper mapper;
+ public abstract Dbo get(Integer id);
+ public abstract List get(DbExample ex);
+
+ public AbstractDao(DbMapper mapper) {
+ this.mapper = mapper;
+ }
+
+ public Dbo save(Dbo toSave) {
+
+ if(toSave.getPkId() == null) {
+ create(toSave);
+ }
+ else {
+ //get record from database
+ Dbo existing = get(toSave.getPkId());
+ if(existing.getUpdatedTime().isAfter(toSave.getUpdatedTime())) {
+ //concurrency problem, get this garbo outta here
+ throw new ConcurrentModificationException();
+ }
+
+ update(toSave);
+ }
+
+ //return the most up to date version of the record
+ return get(toSave.getPkId());
+ }
+
+ public DbMapper getMapper() {
+ return mapper;
+ }
+
+ protected abstract void update(Dbo toSave);
+ protected abstract void create(Dbo toCreate);
+ public void delete(DbExample id) { throw new RuntimeException("delete not supported"); }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dao/BoardDao.java b/src/main/java/com/zfgc/zfgbb/dao/BoardDao.java
index 9a64541..1172a30 100644
--- a/src/main/java/com/zfgc/zfgbb/dao/BoardDao.java
+++ b/src/main/java/com/zfgc/zfgbb/dao/BoardDao.java
@@ -1,42 +1,42 @@
-package com.zfgc.zfgbb.dao;
-
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Repository;
-
-import com.zfgc.zfgbb.dao.AbstractDao;
-import com.zfgc.zfgbb.dbo.BoardDbo;
-import com.zfgc.zfgbb.dbo.BoardDboExample;
-import com.zfgc.zfgbb.mappers.BBCodeAttributeModeDboMapper;
-import com.zfgc.zfgbb.mappers.BoardDboMapper;
-
-@Repository
-public class BoardDao extends AbstractDao{
-
- @Autowired
- public BoardDao(BoardDboMapper mapper) {
- super(mapper);
- }
-
- @Override
- public BoardDbo get(Integer id) {
- return mapper.selectByPrimaryKey(id);
- }
-
- @Override
- protected void update(BoardDbo toSave) {
- mapper.updateByPrimaryKey(toSave);
- }
-
- @Override
- protected void create(BoardDbo toCreate) {
- mapper.insert(toCreate);
- }
-
- @Override
- public List get(BoardDboExample ex) {
- return mapper.selectByExample(ex);
- }
-
+package com.zfgc.zfgbb.dao;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.AbstractDao;
+import com.zfgc.zfgbb.dbo.BoardDbo;
+import com.zfgc.zfgbb.dbo.BoardDboExample;
+import com.zfgc.zfgbb.mappers.BBCodeAttributeModeDboMapper;
+import com.zfgc.zfgbb.mappers.BoardDboMapper;
+
+@Repository
+public class BoardDao extends AbstractDao{
+
+ @Autowired
+ public BoardDao(BoardDboMapper mapper) {
+ super(mapper);
+ }
+
+ @Override
+ public BoardDbo get(Integer id) {
+ return mapper.selectByPrimaryKey(id);
+ }
+
+ @Override
+ protected void update(BoardDbo toSave) {
+ mapper.updateByPrimaryKey(toSave);
+ }
+
+ @Override
+ protected void create(BoardDbo toCreate) {
+ mapper.insert(toCreate);
+ }
+
+ @Override
+ public List get(BoardDboExample ex) {
+ return mapper.selectByExample(ex);
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dao/BoardPermissionViewDao.java b/src/main/java/com/zfgc/zfgbb/dao/BoardPermissionViewDao.java
index a716a13..319c96c 100644
--- a/src/main/java/com/zfgc/zfgbb/dao/BoardPermissionViewDao.java
+++ b/src/main/java/com/zfgc/zfgbb/dao/BoardPermissionViewDao.java
@@ -1,41 +1,41 @@
-package com.zfgc.zfgbb.dao;
-
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Repository;
-
-import com.zfgc.zfgbb.dao.AbstractDao;
-import com.zfgc.zfgbb.dbo.BoardPermissionViewDbo;
-import com.zfgc.zfgbb.dbo.BoardPermissionViewDboExample;
-import com.zfgc.zfgbb.mappers.BoardPermissionViewDboMapper;
-
-@Repository
-public class BoardPermissionViewDao extends AbstractDao{
-
- @Autowired
- public BoardPermissionViewDao(BoardPermissionViewDboMapper mapper) {
- super(mapper);
- }
-
- @Override
- public BoardPermissionViewDbo get(Integer id) {
- return null;
- }
-
- @Override
- public List get(BoardPermissionViewDboExample ex) {
- return mapper.selectByExample(ex);
- }
-
- @Override
- protected void update(BoardPermissionViewDbo toSave) {
-
- }
-
- @Override
- protected void create(BoardPermissionViewDbo toCreate) {
-
- }
-
+package com.zfgc.zfgbb.dao;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.AbstractDao;
+import com.zfgc.zfgbb.dbo.BoardPermissionViewDbo;
+import com.zfgc.zfgbb.dbo.BoardPermissionViewDboExample;
+import com.zfgc.zfgbb.mappers.BoardPermissionViewDboMapper;
+
+@Repository
+public class BoardPermissionViewDao extends AbstractDao{
+
+ @Autowired
+ public BoardPermissionViewDao(BoardPermissionViewDboMapper mapper) {
+ super(mapper);
+ }
+
+ @Override
+ public BoardPermissionViewDbo get(Integer id) {
+ return null;
+ }
+
+ @Override
+ public List get(BoardPermissionViewDboExample ex) {
+ return mapper.selectByExample(ex);
+ }
+
+ @Override
+ protected void update(BoardPermissionViewDbo toSave) {
+
+ }
+
+ @Override
+ protected void create(BoardPermissionViewDbo toCreate) {
+
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dao/CategoryDao.java b/src/main/java/com/zfgc/zfgbb/dao/CategoryDao.java
index 5ce2608..1e26b38 100644
--- a/src/main/java/com/zfgc/zfgbb/dao/CategoryDao.java
+++ b/src/main/java/com/zfgc/zfgbb/dao/CategoryDao.java
@@ -1,42 +1,42 @@
-package com.zfgc.zfgbb.dao;
-
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Repository;
-
-import com.zfgc.zfgbb.dao.AbstractDao;
-import com.zfgc.zfgbb.dbo.CategoryDbo;
-import com.zfgc.zfgbb.dbo.CategoryDboExample;
-import com.zfgc.zfgbb.mappers.BBCodeAttributeModeDboMapper;
-import com.zfgc.zfgbb.mappers.CategoryDboMapper;
-
-@Repository
-public class CategoryDao extends AbstractDao{
-
- @Autowired
- public CategoryDao(CategoryDboMapper mapper) {
- super(mapper);
- }
-
- @Override
- public CategoryDbo get(Integer id) {
- return mapper.selectByPrimaryKey(id);
- }
-
- @Override
- public List get(CategoryDboExample ex) {
- return mapper.selectByExample(ex);
- }
-
- @Override
- protected void update(CategoryDbo toSave) {
- mapper.updateByPrimaryKey(toSave);
- }
-
- @Override
- protected void create(CategoryDbo toCreate) {
- mapper.insert(toCreate);
- }
-
-}
+package com.zfgc.zfgbb.dao;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.AbstractDao;
+import com.zfgc.zfgbb.dbo.CategoryDbo;
+import com.zfgc.zfgbb.dbo.CategoryDboExample;
+import com.zfgc.zfgbb.mappers.BBCodeAttributeModeDboMapper;
+import com.zfgc.zfgbb.mappers.CategoryDboMapper;
+
+@Repository
+public class CategoryDao extends AbstractDao{
+
+ @Autowired
+ public CategoryDao(CategoryDboMapper mapper) {
+ super(mapper);
+ }
+
+ @Override
+ public CategoryDbo get(Integer id) {
+ return mapper.selectByPrimaryKey(id);
+ }
+
+ @Override
+ public List get(CategoryDboExample ex) {
+ return mapper.selectByExample(ex);
+ }
+
+ @Override
+ protected void update(CategoryDbo toSave) {
+ mapper.updateByPrimaryKey(toSave);
+ }
+
+ @Override
+ protected void create(CategoryDbo toCreate) {
+ mapper.insert(toCreate);
+ }
+
+}
diff --git a/src/main/java/com/zfgc/zfgbb/dao/ThreadDao.java b/src/main/java/com/zfgc/zfgbb/dao/ThreadDao.java
index f6c73ba..6480f8f 100644
--- a/src/main/java/com/zfgc/zfgbb/dao/ThreadDao.java
+++ b/src/main/java/com/zfgc/zfgbb/dao/ThreadDao.java
@@ -26,7 +26,7 @@ public ThreadDbo get(Integer id) {
@Override
public List get(ThreadDboExample ex) {
- return mapper.selectByExample(ex);
+ return mapper.selectByExampleWithRange(ex);
}
@Override
diff --git a/src/main/java/com/zfgc/zfgbb/dao/UserPermissionViewDao.java b/src/main/java/com/zfgc/zfgbb/dao/UserPermissionViewDao.java
index d077ec7..1e4d78a 100644
--- a/src/main/java/com/zfgc/zfgbb/dao/UserPermissionViewDao.java
+++ b/src/main/java/com/zfgc/zfgbb/dao/UserPermissionViewDao.java
@@ -1,41 +1,41 @@
-package com.zfgc.zfgbb.dao;
-
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Repository;
-
-import com.zfgc.zfgbb.dao.AbstractDao;
-import com.zfgc.zfgbb.dbo.UserPermissionViewDbo;
-import com.zfgc.zfgbb.dbo.UserPermissionViewDboExample;
-import com.zfgc.zfgbb.mappers.UserPermissionViewDboMapper;
-
-@Repository
-public class UserPermissionViewDao extends AbstractDao{
-
- @Autowired
- public UserPermissionViewDao(UserPermissionViewDboMapper mapper) {
- super(mapper);
- }
-
- @Override
- public UserPermissionViewDbo get(Integer id) {
- return null;
- }
-
- @Override
- public List get(UserPermissionViewDboExample ex) {
- return mapper.selectByExample(ex);
- }
-
- @Override
- protected void update(UserPermissionViewDbo toSave) {
-
- }
-
- @Override
- protected void create(UserPermissionViewDbo toCreate) {
-
- }
-
+package com.zfgc.zfgbb.dao;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.AbstractDao;
+import com.zfgc.zfgbb.dbo.UserPermissionViewDbo;
+import com.zfgc.zfgbb.dbo.UserPermissionViewDboExample;
+import com.zfgc.zfgbb.mappers.UserPermissionViewDboMapper;
+
+@Repository
+public class UserPermissionViewDao extends AbstractDao{
+
+ @Autowired
+ public UserPermissionViewDao(UserPermissionViewDboMapper mapper) {
+ super(mapper);
+ }
+
+ @Override
+ public UserPermissionViewDbo get(Integer id) {
+ return null;
+ }
+
+ @Override
+ public List get(UserPermissionViewDboExample ex) {
+ return mapper.selectByExample(ex);
+ }
+
+ @Override
+ protected void update(UserPermissionViewDbo toSave) {
+
+ }
+
+ @Override
+ protected void create(UserPermissionViewDbo toCreate) {
+
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dao/bbcode/AttributeDataTypeDao.java b/src/main/java/com/zfgc/zfgbb/dao/bbcode/AttributeDataTypeDao.java
index 1edd0b5..f3c6841 100644
--- a/src/main/java/com/zfgc/zfgbb/dao/bbcode/AttributeDataTypeDao.java
+++ b/src/main/java/com/zfgc/zfgbb/dao/bbcode/AttributeDataTypeDao.java
@@ -1,40 +1,40 @@
-package com.zfgc.zfgbb.dao.bbcode;
-
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Repository;
-
-import com.zfgc.zfgbb.dao.AbstractDao;
-import com.zfgc.zfgbb.dbo.AttributeDataTypeDbo;
-import com.zfgc.zfgbb.dbo.AttributeDataTypeDboExample;
-import com.zfgc.zfgbb.mappers.AttributeDataTypeDboMapper;
-
-@Repository
-public class AttributeDataTypeDao extends AbstractDao {
-
- @Autowired
- public AttributeDataTypeDao(AttributeDataTypeDboMapper mapper) {
- super(mapper);
- }
-
- @Override
- public AttributeDataTypeDbo get(Integer id) {
- return mapper.selectByPrimaryKey(id);
- }
-
- @Override
- public List get(AttributeDataTypeDboExample ex) {
- return mapper.selectByExample(ex);
- }
-
- @Override
- protected void update(AttributeDataTypeDbo toSave) {
- mapper.updateByPrimaryKey(toSave);
- }
-
- @Override
- protected void create(AttributeDataTypeDbo toCreate) {
- mapper.insert(toCreate);
- }
-}
+package com.zfgc.zfgbb.dao.bbcode;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.AbstractDao;
+import com.zfgc.zfgbb.dbo.AttributeDataTypeDbo;
+import com.zfgc.zfgbb.dbo.AttributeDataTypeDboExample;
+import com.zfgc.zfgbb.mappers.AttributeDataTypeDboMapper;
+
+@Repository
+public class AttributeDataTypeDao extends AbstractDao {
+
+ @Autowired
+ public AttributeDataTypeDao(AttributeDataTypeDboMapper mapper) {
+ super(mapper);
+ }
+
+ @Override
+ public AttributeDataTypeDbo get(Integer id) {
+ return mapper.selectByPrimaryKey(id);
+ }
+
+ @Override
+ public List get(AttributeDataTypeDboExample ex) {
+ return mapper.selectByExample(ex);
+ }
+
+ @Override
+ protected void update(AttributeDataTypeDbo toSave) {
+ mapper.updateByPrimaryKey(toSave);
+ }
+
+ @Override
+ protected void create(AttributeDataTypeDbo toCreate) {
+ mapper.insert(toCreate);
+ }
+}
diff --git a/src/main/java/com/zfgc/zfgbb/dao/bbcode/BBCodeAttributeDao.java b/src/main/java/com/zfgc/zfgbb/dao/bbcode/BBCodeAttributeDao.java
index b1bf1f1..817823c 100644
--- a/src/main/java/com/zfgc/zfgbb/dao/bbcode/BBCodeAttributeDao.java
+++ b/src/main/java/com/zfgc/zfgbb/dao/bbcode/BBCodeAttributeDao.java
@@ -1,42 +1,42 @@
-package com.zfgc.zfgbb.dao.bbcode;
-
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Repository;
-
-import com.zfgc.zfgbb.dao.AbstractDao;
-import com.zfgc.zfgbb.dbo.BBCodeAttributeDbo;
-import com.zfgc.zfgbb.dbo.BBCodeAttributeDboExample;
-import com.zfgc.zfgbb.mappers.AttributeDataTypeDboMapper;
-import com.zfgc.zfgbb.mappers.BBCodeAttributeDboMapper;
-
-@Repository
-public class BBCodeAttributeDao extends AbstractDao {
-
- @Autowired
- public BBCodeAttributeDao(BBCodeAttributeDboMapper mapper) {
- super(mapper);
- }
-
- @Override
- public BBCodeAttributeDbo get(Integer id) {
- return mapper.selectByPrimaryKey(id);
- }
-
- @Override
- public List get(BBCodeAttributeDboExample ex) {
- return mapper.selectByExample(ex);
- }
-
- @Override
- protected void update(BBCodeAttributeDbo toSave) {
- mapper.updateByPrimaryKey(toSave);
- }
-
- @Override
- protected void create(BBCodeAttributeDbo toCreate) {
- mapper.insert(toCreate);
- }
-
-}
+package com.zfgc.zfgbb.dao.bbcode;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.AbstractDao;
+import com.zfgc.zfgbb.dbo.BBCodeAttributeDbo;
+import com.zfgc.zfgbb.dbo.BBCodeAttributeDboExample;
+import com.zfgc.zfgbb.mappers.AttributeDataTypeDboMapper;
+import com.zfgc.zfgbb.mappers.BBCodeAttributeDboMapper;
+
+@Repository
+public class BBCodeAttributeDao extends AbstractDao {
+
+ @Autowired
+ public BBCodeAttributeDao(BBCodeAttributeDboMapper mapper) {
+ super(mapper);
+ }
+
+ @Override
+ public BBCodeAttributeDbo get(Integer id) {
+ return mapper.selectByPrimaryKey(id);
+ }
+
+ @Override
+ public List get(BBCodeAttributeDboExample ex) {
+ return mapper.selectByExample(ex);
+ }
+
+ @Override
+ protected void update(BBCodeAttributeDbo toSave) {
+ mapper.updateByPrimaryKey(toSave);
+ }
+
+ @Override
+ protected void create(BBCodeAttributeDbo toCreate) {
+ mapper.insert(toCreate);
+ }
+
+}
diff --git a/src/main/java/com/zfgc/zfgbb/dao/bbcode/BBCodeAttributeModeDao.java b/src/main/java/com/zfgc/zfgbb/dao/bbcode/BBCodeAttributeModeDao.java
index fa0dffb..690f67e 100644
--- a/src/main/java/com/zfgc/zfgbb/dao/bbcode/BBCodeAttributeModeDao.java
+++ b/src/main/java/com/zfgc/zfgbb/dao/bbcode/BBCodeAttributeModeDao.java
@@ -1,41 +1,41 @@
-package com.zfgc.zfgbb.dao.bbcode;
-
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Repository;
-
-import com.zfgc.zfgbb.dao.AbstractDao;
-import com.zfgc.zfgbb.dbo.BBCodeAttributeModeDbo;
-import com.zfgc.zfgbb.dbo.BBCodeAttributeModeDboExample;
-import com.zfgc.zfgbb.mappers.BBCodeAttributeDboMapper;
-import com.zfgc.zfgbb.mappers.BBCodeAttributeModeDboMapper;
-
-@Repository
-public class BBCodeAttributeModeDao extends AbstractDao {
-
- @Autowired
- public BBCodeAttributeModeDao(BBCodeAttributeModeDboMapper mapper) {
- super(mapper);
- }
-
- @Override
- public BBCodeAttributeModeDbo get(Integer id) {
- return mapper.selectByPrimaryKey(id);
- }
-
- @Override
- public List get(BBCodeAttributeModeDboExample ex) {
- return mapper.selectByExample(ex);
- }
-
- @Override
- protected void update(BBCodeAttributeModeDbo toSave) {
- mapper.updateByPrimaryKey(toSave);
- }
-
- @Override
- protected void create(BBCodeAttributeModeDbo toCreate) {
- mapper.insert(toCreate);
- }
-}
+package com.zfgc.zfgbb.dao.bbcode;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.AbstractDao;
+import com.zfgc.zfgbb.dbo.BBCodeAttributeModeDbo;
+import com.zfgc.zfgbb.dbo.BBCodeAttributeModeDboExample;
+import com.zfgc.zfgbb.mappers.BBCodeAttributeDboMapper;
+import com.zfgc.zfgbb.mappers.BBCodeAttributeModeDboMapper;
+
+@Repository
+public class BBCodeAttributeModeDao extends AbstractDao {
+
+ @Autowired
+ public BBCodeAttributeModeDao(BBCodeAttributeModeDboMapper mapper) {
+ super(mapper);
+ }
+
+ @Override
+ public BBCodeAttributeModeDbo get(Integer id) {
+ return mapper.selectByPrimaryKey(id);
+ }
+
+ @Override
+ public List get(BBCodeAttributeModeDboExample ex) {
+ return mapper.selectByExample(ex);
+ }
+
+ @Override
+ protected void update(BBCodeAttributeModeDbo toSave) {
+ mapper.updateByPrimaryKey(toSave);
+ }
+
+ @Override
+ protected void create(BBCodeAttributeModeDbo toCreate) {
+ mapper.insert(toCreate);
+ }
+}
diff --git a/src/main/java/com/zfgc/zfgbb/dao/bbcode/BBCodeConfigDao.java b/src/main/java/com/zfgc/zfgbb/dao/bbcode/BBCodeConfigDao.java
index 77829db..46136da 100644
--- a/src/main/java/com/zfgc/zfgbb/dao/bbcode/BBCodeConfigDao.java
+++ b/src/main/java/com/zfgc/zfgbb/dao/bbcode/BBCodeConfigDao.java
@@ -1,41 +1,41 @@
-package com.zfgc.zfgbb.dao.bbcode;
-
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Repository;
-
-import com.zfgc.zfgbb.dao.AbstractDao;
-import com.zfgc.zfgbb.dbo.BBCodeConfigDbo;
-import com.zfgc.zfgbb.dbo.BBCodeConfigDboExample;
-import com.zfgc.zfgbb.mappers.BBCodeConfigDboMapper;
-
-@Repository
-public class BBCodeConfigDao extends AbstractDao {
-
- @Autowired
- public BBCodeConfigDao(BBCodeConfigDboMapper mapper) {
- super(mapper);
- }
-
- @Override
- public BBCodeConfigDbo get(Integer id) {
- return mapper.selectByPrimaryKey(id);
- }
-
- @Override
- public List get(BBCodeConfigDboExample ex) {
- return mapper.selectByExample(ex);
- }
-
- @Override
- protected void update(BBCodeConfigDbo toSave) {
- mapper.updateByPrimaryKey(toSave);
- }
-
- @Override
- protected void create(BBCodeConfigDbo toCreate) {
- mapper.insert(toCreate);
- }
-
-}
+package com.zfgc.zfgbb.dao.bbcode;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.AbstractDao;
+import com.zfgc.zfgbb.dbo.BBCodeConfigDbo;
+import com.zfgc.zfgbb.dbo.BBCodeConfigDboExample;
+import com.zfgc.zfgbb.mappers.BBCodeConfigDboMapper;
+
+@Repository
+public class BBCodeConfigDao extends AbstractDao {
+
+ @Autowired
+ public BBCodeConfigDao(BBCodeConfigDboMapper mapper) {
+ super(mapper);
+ }
+
+ @Override
+ public BBCodeConfigDbo get(Integer id) {
+ return mapper.selectByPrimaryKey(id);
+ }
+
+ @Override
+ public List get(BBCodeConfigDboExample ex) {
+ return mapper.selectByExample(ex);
+ }
+
+ @Override
+ protected void update(BBCodeConfigDbo toSave) {
+ mapper.updateByPrimaryKey(toSave);
+ }
+
+ @Override
+ protected void create(BBCodeConfigDbo toCreate) {
+ mapper.insert(toCreate);
+ }
+
+}
diff --git a/src/main/java/com/zfgc/zfgbb/dao/core/ContentResourceDao.java b/src/main/java/com/zfgc/zfgbb/dao/core/ContentResourceDao.java
new file mode 100644
index 0000000..d757f23
--- /dev/null
+++ b/src/main/java/com/zfgc/zfgbb/dao/core/ContentResourceDao.java
@@ -0,0 +1,41 @@
+package com.zfgc.zfgbb.dao.core;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.AbstractDao;
+import com.zfgc.zfgbb.dbo.ContentResourceDbo;
+import com.zfgc.zfgbb.dbo.ContentResourceDboExample;
+import com.zfgc.zfgbb.mappers.ContentResourceDboMapper;
+
+@Repository
+public class ContentResourceDao extends AbstractDao{
+
+ @Autowired
+ public ContentResourceDao(ContentResourceDboMapper mapper) {
+ super(mapper);
+ }
+
+ @Override
+ public ContentResourceDbo get(Integer id) {
+ return mapper.selectByPrimaryKey(id);
+ }
+
+ @Override
+ public List get(ContentResourceDboExample ex) {
+ return mapper.selectByExample(ex);
+ }
+
+ @Override
+ protected void update(ContentResourceDbo toSave) {
+ mapper.updateByPrimaryKey(toSave);
+ }
+
+ @Override
+ protected void create(ContentResourceDbo toCreate) {
+ mapper.insert(toCreate);
+ }
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dao/core/IpAddressDao.java b/src/main/java/com/zfgc/zfgbb/dao/core/IpAddressDao.java
index 16b5038..cce1bd2 100644
--- a/src/main/java/com/zfgc/zfgbb/dao/core/IpAddressDao.java
+++ b/src/main/java/com/zfgc/zfgbb/dao/core/IpAddressDao.java
@@ -1,41 +1,41 @@
-package com.zfgc.zfgbb.dao.core;
-
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Repository;
-
-import com.zfgc.zfgbb.dao.AbstractDao;
-import com.zfgc.zfgbb.dbo.IpAddressDbo;
-import com.zfgc.zfgbb.dbo.IpAddressDboExample;
-import com.zfgc.zfgbb.mappers.IpAddressDboMapper;
-
-@Repository
-public class IpAddressDao extends AbstractDao {
-
- @Autowired
- public IpAddressDao(IpAddressDboMapper mapper) {
- super(mapper);
- }
-
- @Override
- public IpAddressDbo get(Integer id) {
- return mapper.selectByPrimaryKey(id);
- }
-
- @Override
- public List get(IpAddressDboExample ex) {
- return mapper.selectByExample(ex);
- }
-
- @Override
- protected void update(IpAddressDbo toSave) {
- mapper.updateByPrimaryKey(toSave);
- }
-
- @Override
- protected void create(IpAddressDbo toCreate) {
- mapper.insert(toCreate);
- }
-
-}
+package com.zfgc.zfgbb.dao.core;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.AbstractDao;
+import com.zfgc.zfgbb.dbo.IpAddressDbo;
+import com.zfgc.zfgbb.dbo.IpAddressDboExample;
+import com.zfgc.zfgbb.mappers.IpAddressDboMapper;
+
+@Repository
+public class IpAddressDao extends AbstractDao {
+
+ @Autowired
+ public IpAddressDao(IpAddressDboMapper mapper) {
+ super(mapper);
+ }
+
+ @Override
+ public IpAddressDbo get(Integer id) {
+ return mapper.selectByPrimaryKey(id);
+ }
+
+ @Override
+ public List get(IpAddressDboExample ex) {
+ return mapper.selectByExample(ex);
+ }
+
+ @Override
+ protected void update(IpAddressDbo toSave) {
+ mapper.updateByPrimaryKey(toSave);
+ }
+
+ @Override
+ protected void create(IpAddressDbo toCreate) {
+ mapper.insert(toCreate);
+ }
+
+}
diff --git a/src/main/java/com/zfgc/zfgbb/dao/forum/CurrentMessageDao.java b/src/main/java/com/zfgc/zfgbb/dao/forum/CurrentMessageDao.java
index 6a4cc6f..73d360a 100644
--- a/src/main/java/com/zfgc/zfgbb/dao/forum/CurrentMessageDao.java
+++ b/src/main/java/com/zfgc/zfgbb/dao/forum/CurrentMessageDao.java
@@ -1,41 +1,41 @@
-package com.zfgc.zfgbb.dao.forum;
-
-import java.util.List;
-
-import org.springframework.stereotype.Repository;
-
-import com.zfgc.zfgbb.dao.AbstractDao;
-import com.zfgc.zfgbb.dbo.CurrentMessageDbo;
-import com.zfgc.zfgbb.dbo.CurrentMessageDboExample;
-import com.zfgc.zfgbb.dbo.MessageDbo;
-import com.zfgc.zfgbb.dbo.MessageDboExample;
-import com.zfgc.zfgbb.mappers.CurrentMessageDboMapper;
-
-@Repository
-public class CurrentMessageDao extends AbstractDao{
-
- public CurrentMessageDao(CurrentMessageDboMapper mapper) {
- super(mapper);
- }
-
- @Override
- public CurrentMessageDbo get(Integer id) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public List get(CurrentMessageDboExample ex) {
- return mapper.selectByExample(ex);
- }
-
- @Override
- protected void update(CurrentMessageDbo toSave) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- protected void create(CurrentMessageDbo toCreate) {
- throw new UnsupportedOperationException();
- }
-
+package com.zfgc.zfgbb.dao.forum;
+
+import java.util.List;
+
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.AbstractDao;
+import com.zfgc.zfgbb.dbo.CurrentMessageDbo;
+import com.zfgc.zfgbb.dbo.CurrentMessageDboExample;
+import com.zfgc.zfgbb.dbo.MessageDbo;
+import com.zfgc.zfgbb.dbo.MessageDboExample;
+import com.zfgc.zfgbb.mappers.CurrentMessageDboMapper;
+
+@Repository
+public class CurrentMessageDao extends AbstractDao{
+
+ public CurrentMessageDao(CurrentMessageDboMapper mapper) {
+ super(mapper);
+ }
+
+ @Override
+ public CurrentMessageDbo get(Integer id) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public List get(CurrentMessageDboExample ex) {
+ return mapper.selectByExample(ex);
+ }
+
+ @Override
+ protected void update(CurrentMessageDbo toSave) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ protected void create(CurrentMessageDbo toCreate) {
+ throw new UnsupportedOperationException();
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dao/forum/FileAttachmentsDao.java b/src/main/java/com/zfgc/zfgbb/dao/forum/FileAttachmentsDao.java
new file mode 100644
index 0000000..b2864b8
--- /dev/null
+++ b/src/main/java/com/zfgc/zfgbb/dao/forum/FileAttachmentsDao.java
@@ -0,0 +1,42 @@
+package com.zfgc.zfgbb.dao.forum;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.AbstractDao;
+import com.zfgc.zfgbb.dbo.FileAttachmentDbo;
+import com.zfgc.zfgbb.dbo.FileAttachmentDboExample;
+import com.zfgc.zfgbb.mappers.FileAttachmentDboMapper;
+
+@Repository
+public class FileAttachmentsDao extends AbstractDao{
+
+ @Autowired
+ public FileAttachmentsDao(FileAttachmentDboMapper mapper) {
+ super(mapper);
+ // TODO Auto-generated constructor stub
+ }
+
+ @Override
+ public FileAttachmentDbo get(Integer id) {
+ return mapper.selectByPrimaryKey(id);
+ }
+
+ @Override
+ public List get(FileAttachmentDboExample ex) {
+ return mapper.selectByExample(ex);
+ }
+
+ @Override
+ protected void update(FileAttachmentDbo toSave) {
+ mapper.updateByPrimaryKey(toSave);
+ }
+
+ @Override
+ protected void create(FileAttachmentDbo toCreate) {
+ mapper.insert(toCreate);
+ }
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dao/forum/MessageDao.java b/src/main/java/com/zfgc/zfgbb/dao/forum/MessageDao.java
index 84f9ae0..7987213 100644
--- a/src/main/java/com/zfgc/zfgbb/dao/forum/MessageDao.java
+++ b/src/main/java/com/zfgc/zfgbb/dao/forum/MessageDao.java
@@ -1,53 +1,53 @@
-package com.zfgc.zfgbb.dao.forum;
-
-import java.time.LocalDateTime;
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Repository;
-
-import com.zfgc.zfgbb.dao.AbstractDao;
-import com.zfgc.zfgbb.dbo.BoardDbo;
-import com.zfgc.zfgbb.dbo.BoardDboExample;
-import com.zfgc.zfgbb.dbo.MessageDbo;
-import com.zfgc.zfgbb.dbo.MessageDboExample;
-import com.zfgc.zfgbb.mappers.BoardDboMapper;
-import com.zfgc.zfgbb.mappers.MessageDboMapper;
-
-@Repository
-public class MessageDao extends AbstractDao{
-
- @Autowired
- public MessageDao(MessageDboMapper mapper) {
- super(mapper);
- }
-
- @Override
- public MessageDbo get(Integer id) {
- return mapper.selectByPrimaryKey(id);
- }
-
- @Override
- protected void update(MessageDbo toSave) {
- toSave.setUpdatedTs(LocalDateTime.now());
- mapper.updateByPrimaryKey(toSave);
- }
-
- @Override
- protected void create(MessageDbo toCreate) {
- toCreate.setCreatedTs(LocalDateTime.now());
- toCreate.setUpdatedTs(LocalDateTime.now());
- mapper.insert(toCreate);
- }
-
- @Override
- public List get(MessageDboExample ex) {
- return mapper.selectByExample(ex);
- }
-
- @Override
- public void delete(MessageDboExample ex) {
- mapper.deleteByExample(ex);
- }
-
+package com.zfgc.zfgbb.dao.forum;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.AbstractDao;
+import com.zfgc.zfgbb.dbo.BoardDbo;
+import com.zfgc.zfgbb.dbo.BoardDboExample;
+import com.zfgc.zfgbb.dbo.MessageDbo;
+import com.zfgc.zfgbb.dbo.MessageDboExample;
+import com.zfgc.zfgbb.mappers.BoardDboMapper;
+import com.zfgc.zfgbb.mappers.MessageDboMapper;
+
+@Repository
+public class MessageDao extends AbstractDao{
+
+ @Autowired
+ public MessageDao(MessageDboMapper mapper) {
+ super(mapper);
+ }
+
+ @Override
+ public MessageDbo get(Integer id) {
+ return mapper.selectByPrimaryKey(id);
+ }
+
+ @Override
+ protected void update(MessageDbo toSave) {
+ toSave.setUpdatedTs(LocalDateTime.now());
+ mapper.updateByPrimaryKey(toSave);
+ }
+
+ @Override
+ protected void create(MessageDbo toCreate) {
+ toCreate.setCreatedTs(LocalDateTime.now());
+ toCreate.setUpdatedTs(LocalDateTime.now());
+ mapper.insert(toCreate);
+ }
+
+ @Override
+ public List get(MessageDboExample ex) {
+ return mapper.selectByExample(ex);
+ }
+
+ @Override
+ public void delete(MessageDboExample ex) {
+ mapper.deleteByExample(ex);
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dao/forum/MessageHistoryDao.java b/src/main/java/com/zfgc/zfgbb/dao/forum/MessageHistoryDao.java
index c3e02b8..2dd60d6 100644
--- a/src/main/java/com/zfgc/zfgbb/dao/forum/MessageHistoryDao.java
+++ b/src/main/java/com/zfgc/zfgbb/dao/forum/MessageHistoryDao.java
@@ -1,43 +1,43 @@
-package com.zfgc.zfgbb.dao.forum;
-
-import java.util.List;
-
-import org.springframework.stereotype.Repository;
-
-import com.zfgc.zfgbb.dao.AbstractDao;
-import com.zfgc.zfgbb.dbo.MessageHistoryDbo;
-import com.zfgc.zfgbb.dbo.MessageHistoryDboExample;
-import com.zfgc.zfgbb.mappers.MessageHistoryDboMapper;
-
-@Repository
-public class MessageHistoryDao extends AbstractDao {
-
- public MessageHistoryDao(MessageHistoryDboMapper mapper) {
- super(mapper);
- }
-
- @Override
- public MessageHistoryDbo get(Integer id) {
- return mapper.selectByPrimaryKey(id);
- }
-
- @Override
- public List get(MessageHistoryDboExample ex) {
- return mapper.selectByExample(ex);
- }
-
- @Override
- protected void update(MessageHistoryDbo toSave) {
- mapper.updateByPrimaryKey(toSave);
- }
-
- @Override
- protected void create(MessageHistoryDbo toCreate) {
- mapper.insert(toCreate);
- }
-
- @Override
- public void delete(MessageHistoryDboExample ex) {
- mapper.deleteByExample(ex);
- }
+package com.zfgc.zfgbb.dao.forum;
+
+import java.util.List;
+
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.AbstractDao;
+import com.zfgc.zfgbb.dbo.MessageHistoryDbo;
+import com.zfgc.zfgbb.dbo.MessageHistoryDboExample;
+import com.zfgc.zfgbb.mappers.MessageHistoryDboMapper;
+
+@Repository
+public class MessageHistoryDao extends AbstractDao {
+
+ public MessageHistoryDao(MessageHistoryDboMapper mapper) {
+ super(mapper);
+ }
+
+ @Override
+ public MessageHistoryDbo get(Integer id) {
+ return mapper.selectByPrimaryKey(id);
+ }
+
+ @Override
+ public List get(MessageHistoryDboExample ex) {
+ return mapper.selectByExample(ex);
+ }
+
+ @Override
+ protected void update(MessageHistoryDbo toSave) {
+ mapper.updateByPrimaryKey(toSave);
+ }
+
+ @Override
+ protected void create(MessageHistoryDbo toCreate) {
+ mapper.insert(toCreate);
+ }
+
+ @Override
+ public void delete(MessageHistoryDboExample ex) {
+ mapper.deleteByExample(ex);
+ }
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dao/forum/PollDao.java b/src/main/java/com/zfgc/zfgbb/dao/forum/PollDao.java
index 6015213..f9bf259 100644
--- a/src/main/java/com/zfgc/zfgbb/dao/forum/PollDao.java
+++ b/src/main/java/com/zfgc/zfgbb/dao/forum/PollDao.java
@@ -1,41 +1,41 @@
-package com.zfgc.zfgbb.dao.forum;
-
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Repository;
-
-import com.zfgc.zfgbb.dao.AbstractDao;
-import com.zfgc.zfgbb.dbo.PollDbo;
-import com.zfgc.zfgbb.dbo.PollDboExample;
-import com.zfgc.zfgbb.mappers.PollDboMapper;
-
-@Repository
-public class PollDao extends AbstractDao {
-
- @Autowired
- public PollDao(PollDboMapper mapper) {
- super(mapper);
- }
-
- @Override
- public PollDbo get(Integer id) {
- return mapper.selectByPrimaryKey(id);
- }
-
- @Override
- public List get(PollDboExample ex) {
- return mapper.selectByExample(ex);
- }
-
- @Override
- protected void update(PollDbo toSave) {
- mapper.updateByPrimaryKey(toSave);
- }
-
- @Override
- protected void create(PollDbo toCreate) {
- mapper.insert(toCreate);
- }
-
-}
+package com.zfgc.zfgbb.dao.forum;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.AbstractDao;
+import com.zfgc.zfgbb.dbo.PollDbo;
+import com.zfgc.zfgbb.dbo.PollDboExample;
+import com.zfgc.zfgbb.mappers.PollDboMapper;
+
+@Repository
+public class PollDao extends AbstractDao {
+
+ @Autowired
+ public PollDao(PollDboMapper mapper) {
+ super(mapper);
+ }
+
+ @Override
+ public PollDbo get(Integer id) {
+ return mapper.selectByPrimaryKey(id);
+ }
+
+ @Override
+ public List get(PollDboExample ex) {
+ return mapper.selectByExample(ex);
+ }
+
+ @Override
+ protected void update(PollDbo toSave) {
+ mapper.updateByPrimaryKey(toSave);
+ }
+
+ @Override
+ protected void create(PollDbo toCreate) {
+ mapper.insert(toCreate);
+ }
+
+}
diff --git a/src/main/java/com/zfgc/zfgbb/dao/forum/PollQuestionDao.java b/src/main/java/com/zfgc/zfgbb/dao/forum/PollQuestionDao.java
index 3e4bdbc..957c472 100644
--- a/src/main/java/com/zfgc/zfgbb/dao/forum/PollQuestionDao.java
+++ b/src/main/java/com/zfgc/zfgbb/dao/forum/PollQuestionDao.java
@@ -1,41 +1,41 @@
-package com.zfgc.zfgbb.dao.forum;
-
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Repository;
-
-import com.zfgc.zfgbb.dao.AbstractDao;
-import com.zfgc.zfgbb.dbo.PollQuestionDbo;
-import com.zfgc.zfgbb.dbo.PollQuestionDboExample;
-import com.zfgc.zfgbb.mappers.PollQuestionDboMapper;
-
-@Repository
-public class PollQuestionDao extends AbstractDao {
-
- @Autowired
- public PollQuestionDao(PollQuestionDboMapper mapper) {
- super(mapper);
- }
-
- @Override
- public PollQuestionDbo get(Integer id) {
- return mapper.selectByPrimaryKey(id);
- }
-
- @Override
- public List get(PollQuestionDboExample ex) {
- return mapper.selectByExample(ex);
- }
-
- @Override
- protected void update(PollQuestionDbo toSave) {
- mapper.updateByPrimaryKey(toSave);
- }
-
- @Override
- protected void create(PollQuestionDbo toCreate) {
- mapper.insert(toCreate);
- }
-
+package com.zfgc.zfgbb.dao.forum;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.AbstractDao;
+import com.zfgc.zfgbb.dbo.PollQuestionDbo;
+import com.zfgc.zfgbb.dbo.PollQuestionDboExample;
+import com.zfgc.zfgbb.mappers.PollQuestionDboMapper;
+
+@Repository
+public class PollQuestionDao extends AbstractDao {
+
+ @Autowired
+ public PollQuestionDao(PollQuestionDboMapper mapper) {
+ super(mapper);
+ }
+
+ @Override
+ public PollQuestionDbo get(Integer id) {
+ return mapper.selectByPrimaryKey(id);
+ }
+
+ @Override
+ public List get(PollQuestionDboExample ex) {
+ return mapper.selectByExample(ex);
+ }
+
+ @Override
+ protected void update(PollQuestionDbo toSave) {
+ mapper.updateByPrimaryKey(toSave);
+ }
+
+ @Override
+ protected void create(PollQuestionDbo toCreate) {
+ mapper.insert(toCreate);
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dao/users/AvatarDao.java b/src/main/java/com/zfgc/zfgbb/dao/users/AvatarDao.java
new file mode 100644
index 0000000..872d3a4
--- /dev/null
+++ b/src/main/java/com/zfgc/zfgbb/dao/users/AvatarDao.java
@@ -0,0 +1,42 @@
+package com.zfgc.zfgbb.dao.users;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.AbstractDao;
+import com.zfgc.zfgbb.dbo.AvatarDbo;
+import com.zfgc.zfgbb.dbo.AvatarDboExample;
+import com.zfgc.zfgbb.mappers.AvatarDboMapper;
+
+@Repository
+public class AvatarDao extends AbstractDao {
+
+ @Autowired
+ public AvatarDao(AvatarDboMapper mapper) {
+ super(mapper);
+ }
+
+ @Override
+ public AvatarDbo get(Integer id) {
+ return mapper.selectByPrimaryKey(id);
+ }
+
+ @Override
+ public List get(AvatarDboExample ex) {
+ return mapper.selectByExample(ex);
+ }
+
+ @Override
+ protected void update(AvatarDbo toSave) {
+ mapper.updateByPrimaryKey(toSave);
+
+ }
+
+ @Override
+ protected void create(AvatarDbo toCreate) {
+ mapper.insert(toCreate);
+ }
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dao/users/EmailAddressDao.java b/src/main/java/com/zfgc/zfgbb/dao/users/EmailAddressDao.java
index a641110..d149074 100644
--- a/src/main/java/com/zfgc/zfgbb/dao/users/EmailAddressDao.java
+++ b/src/main/java/com/zfgc/zfgbb/dao/users/EmailAddressDao.java
@@ -1,44 +1,44 @@
-package com.zfgc.zfgbb.dao.users;
-
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Repository;
-
-import com.zfgc.zfgbb.dao.AbstractDao;
-import com.zfgc.zfgbb.dbo.EmailAddressDbo;
-import com.zfgc.zfgbb.dbo.EmailAddressDboExample;
-import com.zfgc.zfgbb.dbo.UserDbo;
-import com.zfgc.zfgbb.dbo.UserDboExample;
-import com.zfgc.zfgbb.mappers.EmailAddressDboMapper;
-import com.zfgc.zfgbb.mappers.UserDboMapper;
-
-@Repository
-public class EmailAddressDao extends AbstractDao{
-
- @Autowired
- public EmailAddressDao(EmailAddressDboMapper mapper) {
- super(mapper);
- }
-
- @Override
- public EmailAddressDbo get(Integer id) {
- return mapper.selectByPrimaryKey(id);
- }
-
- @Override
- public List get(EmailAddressDboExample ex) {
- return mapper.selectByExample(ex);
- }
-
- @Override
- protected void update(EmailAddressDbo toSave) {
- mapper.updateByPrimaryKey(toSave);
- }
-
- @Override
- protected void create(EmailAddressDbo toCreate) {
- mapper.insert(toCreate);
- }
-
+package com.zfgc.zfgbb.dao.users;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.AbstractDao;
+import com.zfgc.zfgbb.dbo.EmailAddressDbo;
+import com.zfgc.zfgbb.dbo.EmailAddressDboExample;
+import com.zfgc.zfgbb.dbo.UserDbo;
+import com.zfgc.zfgbb.dbo.UserDboExample;
+import com.zfgc.zfgbb.mappers.EmailAddressDboMapper;
+import com.zfgc.zfgbb.mappers.UserDboMapper;
+
+@Repository
+public class EmailAddressDao extends AbstractDao{
+
+ @Autowired
+ public EmailAddressDao(EmailAddressDboMapper mapper) {
+ super(mapper);
+ }
+
+ @Override
+ public EmailAddressDbo get(Integer id) {
+ return mapper.selectByPrimaryKey(id);
+ }
+
+ @Override
+ public List get(EmailAddressDboExample ex) {
+ return mapper.selectByExample(ex);
+ }
+
+ @Override
+ protected void update(EmailAddressDbo toSave) {
+ mapper.updateByPrimaryKey(toSave);
+ }
+
+ @Override
+ protected void create(EmailAddressDbo toCreate) {
+ mapper.insert(toCreate);
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dao/users/UserBioInfoDao.java b/src/main/java/com/zfgc/zfgbb/dao/users/UserBioInfoDao.java
index 794a584..b2a2d91 100644
--- a/src/main/java/com/zfgc/zfgbb/dao/users/UserBioInfoDao.java
+++ b/src/main/java/com/zfgc/zfgbb/dao/users/UserBioInfoDao.java
@@ -1,42 +1,42 @@
-package com.zfgc.zfgbb.dao.users;
-
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Repository;
-
-import com.zfgc.zfgbb.dao.AbstractDao;
-import com.zfgc.zfgbb.dbo.UserBioInfoDbo;
-import com.zfgc.zfgbb.dbo.UserBioInfoDboExample;
-import com.zfgc.zfgbb.mappers.UserBioInfoDboMapper;
-
-@Repository
-public class UserBioInfoDao extends AbstractDao {
-
- @Autowired
- public UserBioInfoDao(UserBioInfoDboMapper mapper) {
- super(mapper);
- }
-
- @Override
- public UserBioInfoDbo get(Integer id) {
- return mapper.selectByPrimaryKey(id);
- }
-
- @Override
- public List get(UserBioInfoDboExample ex) {
- return mapper.selectByExample(ex);
- }
-
- @Override
- protected void update(UserBioInfoDbo toSave) {
- mapper.updateByPrimaryKey(toSave);
-
- }
-
- @Override
- protected void create(UserBioInfoDbo toCreate) {
- mapper.insert(toCreate);
- }
-
+package com.zfgc.zfgbb.dao.users;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.AbstractDao;
+import com.zfgc.zfgbb.dbo.UserBioInfoDbo;
+import com.zfgc.zfgbb.dbo.UserBioInfoDboExample;
+import com.zfgc.zfgbb.mappers.UserBioInfoDboMapper;
+
+@Repository
+public class UserBioInfoDao extends AbstractDao {
+
+ @Autowired
+ public UserBioInfoDao(UserBioInfoDboMapper mapper) {
+ super(mapper);
+ }
+
+ @Override
+ public UserBioInfoDbo get(Integer id) {
+ return mapper.selectByPrimaryKey(id);
+ }
+
+ @Override
+ public List get(UserBioInfoDboExample ex) {
+ return mapper.selectByExample(ex);
+ }
+
+ @Override
+ protected void update(UserBioInfoDbo toSave) {
+ mapper.updateByPrimaryKey(toSave);
+
+ }
+
+ @Override
+ protected void create(UserBioInfoDbo toCreate) {
+ mapper.insert(toCreate);
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dao/users/UserDao.java b/src/main/java/com/zfgc/zfgbb/dao/users/UserDao.java
index 52eb8aa..3a006c2 100644
--- a/src/main/java/com/zfgc/zfgbb/dao/users/UserDao.java
+++ b/src/main/java/com/zfgc/zfgbb/dao/users/UserDao.java
@@ -1,41 +1,41 @@
-package com.zfgc.zfgbb.dao.users;
-
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Repository;
-
-import com.zfgc.zfgbb.dao.AbstractDao;
-import com.zfgc.zfgbb.dbo.UserDbo;
-import com.zfgc.zfgbb.dbo.UserDboExample;
-import com.zfgc.zfgbb.mappers.UserDboMapper;
-
-@Repository
-public class UserDao extends AbstractDao{
-
- @Autowired
- public UserDao(UserDboMapper mapper) {
- super(mapper);
- }
-
- @Override
- public UserDbo get(Integer id) {
- return mapper.selectByPrimaryKey(id);
- }
-
- @Override
- public List get(UserDboExample ex) {
- return mapper.selectByExample(ex);
- }
-
- @Override
- protected void update(UserDbo toSave) {
- mapper.updateByPrimaryKey(toSave);
- }
-
- @Override
- protected void create(UserDbo toCreate) {
- mapper.insert(toCreate);
- }
-
+package com.zfgc.zfgbb.dao.users;
+
+import java.util.List;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.AbstractDao;
+import com.zfgc.zfgbb.dbo.UserDbo;
+import com.zfgc.zfgbb.dbo.UserDboExample;
+import com.zfgc.zfgbb.mappers.UserDboMapper;
+
+@Repository
+public class UserDao extends AbstractDao{
+
+ @Autowired
+ public UserDao(UserDboMapper mapper) {
+ super(mapper);
+ }
+
+ @Override
+ public UserDbo get(Integer id) {
+ return mapper.selectByPrimaryKey(id);
+ }
+
+ @Override
+ public List get(UserDboExample ex) {
+ return mapper.selectByExample(ex);
+ }
+
+ @Override
+ protected void update(UserDbo toSave) {
+ mapper.updateByPrimaryKey(toSave);
+ }
+
+ @Override
+ protected void create(UserDbo toCreate) {
+ mapper.insert(toCreate);
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dataprovider/AbstractDataProvider.java b/src/main/java/com/zfgc/zfgbb/dataprovider/AbstractDataProvider.java
index 08159a1..b4a8445 100644
--- a/src/main/java/com/zfgc/zfgbb/dataprovider/AbstractDataProvider.java
+++ b/src/main/java/com/zfgc/zfgbb/dataprovider/AbstractDataProvider.java
@@ -1,21 +1,21 @@
-package com.zfgc.zfgbb.dataprovider;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.stream.Collectors;
-
-import org.modelmapper.ModelMapper;
-import org.springframework.beans.factory.annotation.Autowired;
-
-public class AbstractDataProvider {
- @Autowired
- protected ModelMapper mapper;
-
- public List convertDboListToModel(List input, Class type){
- if(input != null) {
- return input.stream().map(x -> mapper.map(x, type)).collect(Collectors.toList());
- }
-
- return new ArrayList();
- }
+package com.zfgc.zfgbb.dataprovider;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.modelmapper.ModelMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class AbstractDataProvider {
+ @Autowired
+ protected ModelMapper mapper;
+
+ public List convertDboListToModel(List input, Class type){
+ if(input != null) {
+ return input.stream().map(x -> mapper.map(x, type)).collect(Collectors.toList());
+ }
+
+ return new ArrayList();
+ }
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dataprovider/core/IpDataProvider.java b/src/main/java/com/zfgc/zfgbb/dataprovider/core/IpDataProvider.java
index 3ea91eb..854bd20 100644
--- a/src/main/java/com/zfgc/zfgbb/dataprovider/core/IpDataProvider.java
+++ b/src/main/java/com/zfgc/zfgbb/dataprovider/core/IpDataProvider.java
@@ -1,35 +1,35 @@
-package com.zfgc.zfgbb.dataprovider.core;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Repository;
-
-import com.zfgc.zfgbb.dao.core.IpAddressDao;
-import com.zfgc.zfgbb.dataprovider.AbstractDataProvider;
-import com.zfgc.zfgbb.dbo.IpAddressDbo;
-import com.zfgc.zfgbb.dbo.IpAddressDboExample;
-import com.zfgc.zfgbb.model.meta.IpAddress;
-
-@Repository
-public class IpDataProvider extends AbstractDataProvider {
- @Autowired
- private IpAddressDao ipDao;
-
- public IpAddress createOrRetrieveIp(String ip) {
- IpAddressDboExample ex = new IpAddressDboExample();
- ex.createCriteria().andIpEqualTo(ip);
-
- IpAddressDbo result = ipDao.get(ex).stream().findFirst().orElse(null);
-
- if(result == null) {
- result = new IpAddressDbo();
- result.setIp(ip);
- //todo: add a regex for this
- result.setIpV6Flag(false);
- //todo: add stopforum spam for this
- result.setIsSpammerFlag(false);
- ipDao.save(result);
- }
-
- return mapper.map(result, IpAddress.class);
- }
-}
+package com.zfgc.zfgbb.dataprovider.core;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.core.IpAddressDao;
+import com.zfgc.zfgbb.dataprovider.AbstractDataProvider;
+import com.zfgc.zfgbb.dbo.IpAddressDbo;
+import com.zfgc.zfgbb.dbo.IpAddressDboExample;
+import com.zfgc.zfgbb.model.meta.IpAddress;
+
+@Repository
+public class IpDataProvider extends AbstractDataProvider {
+ @Autowired
+ private IpAddressDao ipDao;
+
+ public IpAddress createOrRetrieveIp(String ip) {
+ IpAddressDboExample ex = new IpAddressDboExample();
+ ex.createCriteria().andIpEqualTo(ip);
+
+ IpAddressDbo result = ipDao.get(ex).stream().findFirst().orElse(null);
+
+ if(result == null) {
+ result = new IpAddressDbo();
+ result.setIp(ip);
+ //todo: add a regex for this
+ result.setIpV6Flag(false);
+ //todo: add stopforum spam for this
+ result.setIsSpammerFlag(false);
+ ipDao.save(result);
+ }
+
+ return mapper.map(result, IpAddress.class);
+ }
+}
diff --git a/src/main/java/com/zfgc/zfgbb/dataprovider/forum/BBCodeDataProvider.java b/src/main/java/com/zfgc/zfgbb/dataprovider/forum/BBCodeDataProvider.java
index b360410..ee608dc 100644
--- a/src/main/java/com/zfgc/zfgbb/dataprovider/forum/BBCodeDataProvider.java
+++ b/src/main/java/com/zfgc/zfgbb/dataprovider/forum/BBCodeDataProvider.java
@@ -1,102 +1,102 @@
-package com.zfgc.zfgbb.dataprovider.forum;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Repository;
-
-import com.zfgc.zfgbb.dao.bbcode.BBCodeAttributeDao;
-import com.zfgc.zfgbb.dao.bbcode.BBCodeAttributeModeDao;
-import com.zfgc.zfgbb.dao.bbcode.BBCodeConfigDao;
-import com.zfgc.zfgbb.dataprovider.AbstractDataProvider;
-import com.zfgc.zfgbb.dbo.BBCodeAttributeDbo;
-import com.zfgc.zfgbb.dbo.BBCodeAttributeDboExample;
-import com.zfgc.zfgbb.dbo.BBCodeAttributeModeDbo;
-import com.zfgc.zfgbb.dbo.BBCodeAttributeModeDboExample;
-import com.zfgc.zfgbb.dbo.BBCodeConfigDbo;
-import com.zfgc.zfgbb.dbo.BBCodeConfigDboExample;
-import com.zfgc.zfgbb.model.forum.AttributeDataType;
-import com.zfgc.zfgbb.model.forum.BBCodeAttribute;
-import com.zfgc.zfgbb.model.forum.BBCodeAttributeMode;
-import com.zfgc.zfgbb.model.forum.BBCodeConfig;
-
-@Repository
-public class BBCodeDataProvider extends AbstractDataProvider {
-
- @Autowired
- private BBCodeConfigDao bbCodeConfigDao;
-
- @Autowired
- private BBCodeAttributeModeDao bbCodeAttributeModeDao;
-
- @Autowired
- private BBCodeAttributeDao bbCodeAttributeDao;
-
- public List getValidBbCodes() {
- BBCodeConfigDboExample ex = new BBCodeConfigDboExample();
- List results = bbCodeConfigDao.get(ex);
-
- return super.convertDboListToModel(results, BBCodeConfig.class);
- }
-
- public List getAttributeModesByBbCode(Integer bbCodeId) {
- BBCodeAttributeModeDboExample ex = new BBCodeAttributeModeDboExample();
- ex.createCriteria().andBbCodeConfigIdEqualTo(bbCodeId);
- List results = bbCodeAttributeModeDao.get(ex);
-
- return super.convertDboListToModel(results, BBCodeAttributeMode.class);
- }
-
- public List getAttributesByMode(Integer modeId){
- BBCodeAttributeDboExample ex = new BBCodeAttributeDboExample();
- ex.createCriteria().andBbCodeAttributeModeIdEqualTo(modeId);
- List results = bbCodeAttributeDao.get(ex);
-
- return super.convertDboListToModel(results, BBCodeAttribute.class);
- }
-
- public Map getBbCodeConfig(){
- Map result = new HashMap<>();
-
- List bbCodes = getValidBbCodes();
- StringBuilder attString = null;
- for(BBCodeConfig bbCode : bbCodes){
- attString = new StringBuilder();
- //LOGGER.info("Loading Config for " + config.getCode() + "...");
- List modesDb = getAttributeModesByBbCode(bbCode.getBbCodeConfigId());
- List modes = new ArrayList<>();
- for(BBCodeAttributeMode mode : modesDb){
- modes.add(mode);
- StringBuilder modeString = new StringBuilder();
- List attributeDb = getAttributesByMode(mode.getBbCodeAttributeModeId());
- List attributes = new ArrayList<>();
-
- for(BBCodeAttribute attribute : attributeDb){
- attribute.setDataType(AttributeDataType.values()[attribute.getAttributeDataType()]);
- attribute.setAttributeIndex("{{" + Integer.parseInt(attribute.getAttributeIndex()) + "}}");
- attribute.setName(attribute.getName().equals("NAMELESS") ? "=" : attribute.getName() + "=");
- attributes.add(attribute);
- modeString.append(attribute.getName().equals("NAMELESS") ? "=" : attribute.getName() + "=");
-
- if(attString.indexOf(attribute.getName()) == -1 || attString.length() == 0){
- if(attString.length() > 0){
- attString.append(",");
- }
-
- attString.append(attribute.getName().equals("NAMELESS") ? "=" : attribute.getName() + "=");
- }
- }
-
- mode.setAttributes(attributes);
- bbCode.getAttributeConfig().put(modeString.toString(), mode);
- }
- bbCode.setAllAttributeNamesAsString(attString.toString());
- result.put(bbCode.getCode(), bbCode);
- }
-
- return result;
- }
+package com.zfgc.zfgbb.dataprovider.forum;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.bbcode.BBCodeAttributeDao;
+import com.zfgc.zfgbb.dao.bbcode.BBCodeAttributeModeDao;
+import com.zfgc.zfgbb.dao.bbcode.BBCodeConfigDao;
+import com.zfgc.zfgbb.dataprovider.AbstractDataProvider;
+import com.zfgc.zfgbb.dbo.BBCodeAttributeDbo;
+import com.zfgc.zfgbb.dbo.BBCodeAttributeDboExample;
+import com.zfgc.zfgbb.dbo.BBCodeAttributeModeDbo;
+import com.zfgc.zfgbb.dbo.BBCodeAttributeModeDboExample;
+import com.zfgc.zfgbb.dbo.BBCodeConfigDbo;
+import com.zfgc.zfgbb.dbo.BBCodeConfigDboExample;
+import com.zfgc.zfgbb.model.forum.AttributeDataType;
+import com.zfgc.zfgbb.model.forum.BBCodeAttribute;
+import com.zfgc.zfgbb.model.forum.BBCodeAttributeMode;
+import com.zfgc.zfgbb.model.forum.BBCodeConfig;
+
+@Repository
+public class BBCodeDataProvider extends AbstractDataProvider {
+
+ @Autowired
+ private BBCodeConfigDao bbCodeConfigDao;
+
+ @Autowired
+ private BBCodeAttributeModeDao bbCodeAttributeModeDao;
+
+ @Autowired
+ private BBCodeAttributeDao bbCodeAttributeDao;
+
+ public List getValidBbCodes() {
+ BBCodeConfigDboExample ex = new BBCodeConfigDboExample();
+ List results = bbCodeConfigDao.get(ex);
+
+ return super.convertDboListToModel(results, BBCodeConfig.class);
+ }
+
+ public List getAttributeModesByBbCode(Integer bbCodeId) {
+ BBCodeAttributeModeDboExample ex = new BBCodeAttributeModeDboExample();
+ ex.createCriteria().andBbCodeConfigIdEqualTo(bbCodeId);
+ List results = bbCodeAttributeModeDao.get(ex);
+
+ return super.convertDboListToModel(results, BBCodeAttributeMode.class);
+ }
+
+ public List getAttributesByMode(Integer modeId){
+ BBCodeAttributeDboExample ex = new BBCodeAttributeDboExample();
+ ex.createCriteria().andBbCodeAttributeModeIdEqualTo(modeId);
+ List results = bbCodeAttributeDao.get(ex);
+
+ return super.convertDboListToModel(results, BBCodeAttribute.class);
+ }
+
+ public Map getBbCodeConfig(){
+ Map result = new HashMap<>();
+
+ List bbCodes = getValidBbCodes();
+ StringBuilder attString = null;
+ for(BBCodeConfig bbCode : bbCodes){
+ attString = new StringBuilder();
+ //LOGGER.info("Loading Config for " + config.getCode() + "...");
+ List modesDb = getAttributeModesByBbCode(bbCode.getBbCodeConfigId());
+ List modes = new ArrayList<>();
+ for(BBCodeAttributeMode mode : modesDb){
+ modes.add(mode);
+ StringBuilder modeString = new StringBuilder();
+ List attributeDb = getAttributesByMode(mode.getBbCodeAttributeModeId());
+ List attributes = new ArrayList<>();
+
+ for(BBCodeAttribute attribute : attributeDb){
+ attribute.setDataType(AttributeDataType.values()[attribute.getAttributeDataType()]);
+ attribute.setAttributeIndex("{{" + Integer.parseInt(attribute.getAttributeIndex()) + "}}");
+ attribute.setName(attribute.getName().equals("NAMELESS") ? "=" : attribute.getName() + "=");
+ attributes.add(attribute);
+ modeString.append(attribute.getName().equals("NAMELESS") ? "=" : attribute.getName() + "=");
+
+ if(attString.indexOf(attribute.getName()) == -1 || attString.length() == 0){
+ if(attString.length() > 0){
+ attString.append(",");
+ }
+
+ attString.append(attribute.getName().equals("NAMELESS") ? "=" : attribute.getName() + "=");
+ }
+ }
+
+ mode.setAttributes(attributes);
+ bbCode.getAttributeConfig().put(modeString.toString(), mode);
+ }
+ bbCode.setAllAttributeNamesAsString(attString.toString());
+ result.put(bbCode.getCode(), bbCode);
+ }
+
+ return result;
+ }
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dataprovider/forum/CategoryDataProvider.java b/src/main/java/com/zfgc/zfgbb/dataprovider/forum/CategoryDataProvider.java
deleted file mode 100644
index d91568e..0000000
--- a/src/main/java/com/zfgc/zfgbb/dataprovider/forum/CategoryDataProvider.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.zfgc.zfgbb.dataprovider.forum;
-
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Repository;
-
-import com.zfgc.zfgbb.dao.BoardDao;
-import com.zfgc.zfgbb.dao.CategoryDao;
-import com.zfgc.zfgbb.dataprovider.AbstractDataProvider;
-import com.zfgc.zfgbb.dbo.BoardDboExample;
-import com.zfgc.zfgbb.dbo.CategoryDboExample;
-import com.zfgc.zfgbb.model.forum.Board;
-import com.zfgc.zfgbb.model.forum.Category;
-
-@Repository
-public class CategoryDataProvider extends AbstractDataProvider {
-
- @Autowired
- private CategoryDao categoryDao;
-
- @Autowired
- private BoardDao boardDao;
-
- public List getCategories(CategoryDboExample exC){
- List categories = super.convertDboListToModel(categoryDao.get(exC), Category.class);
-
- categories.forEach(cat ->{
- BoardDboExample ex = new BoardDboExample();
- ex.createCriteria().andCategoryIdEqualTo(cat.getCategoryId());
- cat.setBoards(convertDboListToModel(boardDao.get(ex), Board.class));
- });
-
- return categories;
- }
-
-}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dataprovider/forum/ForumDataProvider.java b/src/main/java/com/zfgc/zfgbb/dataprovider/forum/ForumDataProvider.java
index 7ee4b7d..852af19 100644
--- a/src/main/java/com/zfgc/zfgbb/dataprovider/forum/ForumDataProvider.java
+++ b/src/main/java/com/zfgc/zfgbb/dataprovider/forum/ForumDataProvider.java
@@ -1,6 +1,9 @@
package com.zfgc.zfgbb.dataprovider.forum;
+import java.util.Arrays;
import java.util.List;
+import java.util.Map;
+import java.util.function.Function;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
@@ -10,31 +13,23 @@
import com.zfgc.zfgbb.dao.BoardPermissionViewDao;
import com.zfgc.zfgbb.dao.CategoryDao;
import com.zfgc.zfgbb.dao.ThreadDao;
-import com.zfgc.zfgbb.dao.forum.CurrentMessageDao;
-import com.zfgc.zfgbb.dao.forum.MessageDao;
-import com.zfgc.zfgbb.dao.forum.MessageHistoryDao;
import com.zfgc.zfgbb.dataprovider.AbstractDataProvider;
import com.zfgc.zfgbb.dbo.BoardDbo;
import com.zfgc.zfgbb.dbo.BoardDboExample;
import com.zfgc.zfgbb.dbo.BoardPermissionViewDboExample;
-import com.zfgc.zfgbb.dbo.CategoryDbo;
+import com.zfgc.zfgbb.dbo.BoardSummaryViewDboExample;
import com.zfgc.zfgbb.dbo.CategoryDboExample;
-import com.zfgc.zfgbb.dbo.CurrentMessageDboExample;
-import com.zfgc.zfgbb.dbo.MessageDbo;
-import com.zfgc.zfgbb.dbo.MessageDboExample;
-import com.zfgc.zfgbb.dbo.MessageHistoryDbo;
-import com.zfgc.zfgbb.dbo.MessageHistoryDboExample;
-import com.zfgc.zfgbb.dbo.ThreadDbo;
+import com.zfgc.zfgbb.dbo.ChildBoardViewDboExample;
import com.zfgc.zfgbb.dbo.ThreadDboExample;
+import com.zfgc.zfgbb.mappers.BoardSummaryViewDboMapper;
+import com.zfgc.zfgbb.mappers.ChildBoardViewDboMapper;
import com.zfgc.zfgbb.model.forum.Board;
+import com.zfgc.zfgbb.model.forum.BoardSummary;
import com.zfgc.zfgbb.model.forum.Category;
+import com.zfgc.zfgbb.model.forum.ChildBoard;
import com.zfgc.zfgbb.model.forum.Forum;
-import com.zfgc.zfgbb.model.forum.Message;
-import com.zfgc.zfgbb.model.forum.MessageHistory;
import com.zfgc.zfgbb.model.forum.Thread;
import com.zfgc.zfgbb.model.users.Permission;
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Streams;
@Repository
public class ForumDataProvider extends AbstractDataProvider {
@@ -43,7 +38,7 @@ public class ForumDataProvider extends AbstractDataProvider {
private BoardDao boardDao;
@Autowired
- private CategoryDataProvider categoryDataProvider;
+ private CategoryDao categoryDao;
@Autowired
private ThreadDao threadDao;
@@ -54,40 +49,129 @@ public class ForumDataProvider extends AbstractDataProvider {
@Autowired
private BoardPermissionViewDao boardPermissionDao;
- public Forum getForum(Integer boardId) {
+ @Autowired
+ private BoardSummaryViewDboMapper boardSummaryMapper;
+
+ @Autowired
+ private ChildBoardViewDboMapper childBoardMapper;
+
+ public Board getBoard(Integer boardId, Integer pageNo, Integer threadsPerPage) {
+ BoardDbo boardDbo = boardDao.get(boardId);
+ Board board = mapper.map(boardDbo, Board.class);
+
+ List unstickyThreads = threadDataProvider.getThreadsByBoardId(boardId, pageNo, threadsPerPage, false);
+ List stickyThreads = threadDataProvider.getThreadsByBoardId(boardId, null, null, true);
+
+ board.setStickyThreads(stickyThreads);
+ board.setUnStickyThreads(unstickyThreads);
+
+ ThreadDboExample threadEx = new ThreadDboExample();
+ threadEx.createCriteria().andBoardIdEqualTo(boardId).andPinnedFlagEqualTo(false);
+ Long threadCount = threadDao.getMapper().countByExample(threadEx);
+ board.setThreadCount(threadCount);
+
+ board.setChildBoards(getBoardSummaries(board.getBoardId()));
+
+ return board;
+ }
+
+ private List getBoardSummaries(Integer parentBoardId){
+ return getBoardSummaries(Arrays.asList(parentBoardId));
+ }
+
+ private List getBoardSummaries(List parentBoardId){
+ BoardSummaryViewDboExample bEx = new BoardSummaryViewDboExample();
+ bEx.createCriteria().andParentBoardIdIn(parentBoardId);
+ List result = (boardSummaryMapper.selectByExample(bEx).stream().map(b -> mapper.map(b, BoardSummary.class)).collect(Collectors.toList()));
+
+ ChildBoardViewDboExample cEx = new ChildBoardViewDboExample();
+ cEx.createCriteria().andParentBoardIdIn(parentBoardId);
+
+ Map> childBoards = childBoardMapper.selectByExample(cEx).stream()
+ .map(c -> mapper.map(c, ChildBoard.class))
+ .collect(Collectors.groupingBy(ChildBoard::getParentBoardId));
+
+ result.forEach(bs -> {
+ bs.setChildBoards(childBoards.get(bs.getBoardId()));
+ });
+
+
+ return result;
+ }
+
+ private List getBoardSummariesByCategory(List categoryId){
+ BoardSummaryViewDboExample bEx = new BoardSummaryViewDboExample();
+ bEx.createCriteria().andCategoryIdIn(categoryId);
+ List result = (boardSummaryMapper.selectByExample(bEx).stream().map(b -> mapper.map(b, BoardSummary.class)).collect(Collectors.toList()));
+
+ if(!result.isEmpty()) {
+ ChildBoardViewDboExample cEx = new ChildBoardViewDboExample();
+ cEx.createCriteria().andParentBoardIdIn(result.stream().map(BoardSummary::getBoardId).collect(Collectors.toList()));
+
+ Map> childBoards = childBoardMapper.selectByExample(cEx).stream()
+ .map(c -> mapper.map(c, ChildBoard.class))
+ .collect(Collectors.groupingBy(ChildBoard::getParentBoardId));
+
+ result.forEach(bs -> {
+ bs.setChildBoards(childBoards.get(bs.getBoardId()));
+ });
+ }
+
+
+ return result;
+ }
+
+ public Forum getForum() {
Forum forum = new Forum();
- BoardDbo boardDbo = boardDao.get(boardId);
+ BoardDbo boardDbo = boardDao.get(0);
forum.setBoardName(boardDbo.getBoardName());
CategoryDboExample exC = new CategoryDboExample();
- exC.createCriteria().andParentBoardIdEqualTo(boardId);
- List categories = categoryDataProvider.getCategories(exC);
+ exC.createCriteria().andParentBoardIdEqualTo(0);
+ List categories = getCategories(exC);
- List unstickyThreads = threadDataProvider.getThreadsByBoardId(boardId, false);
- List stickyThreads = threadDataProvider.getThreadsByBoardId(boardId, true);
-
- forum.setThreads(unstickyThreads);
- forum.setStickyThreads(stickyThreads);
forum.setCategories(categories);
- forum.setCategoryId(boardDbo.getCategoryId());
//load up permissions for the board
- forum.setBoardPermissions(getBoardPermissions(boardId));
-
- ThreadDboExample threadEx = new ThreadDboExample();
- threadEx.createCriteria().andBoardIdEqualTo(boardId).andPinnedFlagEqualTo(false);
- Long threadCount = threadDao.getMapper().countByExample(threadEx);
- forum.setThreadCount(threadCount);
+ forum.setBoardPermissions(getBoardPermissions(0));
-
return forum;
}
+ public List getCategories(CategoryDboExample exC){
+ List categories = super.convertDboListToModel(categoryDao.get(exC), Category.class);
+ List categoryIds = categories.stream().map(Category::getCategoryId).collect(Collectors.toList());
+
+ Map> summaries = getBoardSummariesByCategory(categoryIds).stream().collect(Collectors.groupingBy(BoardSummary::getCategoryId));
+
+ categories.forEach(cat ->{
+ cat.setBoards(summaries.get(cat.getCategoryId()));
+ });
+
+ return categories;
+ }
+
public List getBoardPermissions(Integer boardId){
BoardPermissionViewDboExample bEx = new BoardPermissionViewDboExample();
bEx.createCriteria().andBoardIdEqualTo(boardId);
return super.convertDboListToModel(boardPermissionDao.get(bEx), Permission.class);
}
+ public List getBoardsByParent(Integer parentBoardId){
+ BoardDboExample bEx = new BoardDboExample();
+ bEx.createCriteria().andParentBoardIdEqualTo(parentBoardId);
+
+ List result = super.convertDboListToModel(boardDao.get(bEx), Board.class);
+ result.forEach(b -> {
+ ThreadDboExample tEx = new ThreadDboExample();
+ tEx.createCriteria().andBoardIdEqualTo(b.getBoardId());
+
+ b.setThreadCount(threadDao.getMapper().countByExample(tEx));
+ });
+
+ return result;
+
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dataprovider/forum/MessageDataProvider.java b/src/main/java/com/zfgc/zfgbb/dataprovider/forum/MessageDataProvider.java
index 1e9f4cf..878b628 100644
--- a/src/main/java/com/zfgc/zfgbb/dataprovider/forum/MessageDataProvider.java
+++ b/src/main/java/com/zfgc/zfgbb/dataprovider/forum/MessageDataProvider.java
@@ -1,145 +1,154 @@
-package com.zfgc.zfgbb.dataprovider.forum;
-
-import java.util.List;
-import java.util.stream.Collectors;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Repository;
-
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Streams;
-import com.zfgc.zfgbb.dao.forum.CurrentMessageDao;
-import com.zfgc.zfgbb.dao.forum.MessageDao;
-import com.zfgc.zfgbb.dao.forum.MessageHistoryDao;
-import com.zfgc.zfgbb.dataprovider.AbstractDataProvider;
-import com.zfgc.zfgbb.dbo.CurrentMessageDboExample;
-import com.zfgc.zfgbb.dbo.MessageDbo;
-import com.zfgc.zfgbb.dbo.MessageDboExample;
-import com.zfgc.zfgbb.dbo.MessageHistoryDbo;
-import com.zfgc.zfgbb.dbo.MessageHistoryDboExample;
-import com.zfgc.zfgbb.model.forum.Message;
-import com.zfgc.zfgbb.model.forum.MessageHistory;
-
-@Repository
-public class MessageDataProvider extends AbstractDataProvider {
- @Autowired
- private MessageDao messageDao;
-
- @Autowired
- private MessageHistoryDao messageHistoryDao;
-
- @Autowired
- private CurrentMessageDao currentMessageDao;
-
- public Message getMessage(Integer messageId) {
- Message message = mapper.map(messageDao.get(messageId), Message.class);
- MessageHistoryDboExample ex = new MessageHistoryDboExample();
- ex.createCriteria().andMessageIdEqualTo(messageId).andCurrentFlagEqualTo(true);
- List history = super.convertDboListToModel(messageHistoryDao.get(ex), MessageHistory.class);
- message.setCurrentMessage(history.get(0));
-
- return message;
- }
-
- public Message saveMessage(Message message) {
- MessageDbo messageDbo = mapper.map(message, MessageDbo.class);
-
- messageDbo = messageDao.save(messageDbo);
-
- MessageHistory history = message.getCurrentMessage();
- history.setMessageId(messageDbo.getMessageId());
- MessageHistoryDbo historyDbo = mapper.map(history, MessageHistoryDbo.class);
- historyDbo.setMessageText(history.getUnparsedText());
- historyDbo = messageHistoryDao.save(historyDbo);
-
- Message result = mapper.map(messageDbo, Message.class);
- result.setCurrentMessage(mapper.map(historyDbo, MessageHistory.class));
-
- return result;
- }
-
- public List getMessagesForThread(Integer threadId, Integer page, Integer count){
- Integer start = ((page - 1)*count) + 1;
- CurrentMessageDboExample ex = new CurrentMessageDboExample();
- ex.createCriteria().andThreadIdEqualTo(threadId)
- .andPostInThreadBetween(start, start + count);
-
-
-
- List messages = currentMessageDao.get(ex)
- .stream()
- .map(message -> {
- Message msg = mapper.map(message, Message.class);
- MessageHistory hist = mapper.map(message, MessageHistory.class);
- hist.setUnparsedText(hist.getMessageText());
- msg.setCurrentMessage(hist);
- return msg;
- }).collect(Collectors.toList());
-
-
-
- return super.convertDboListToModel(messages, Message.class);
- }
-
- public Message postMessageToThread(Integer threadId, Message message) {
- Preconditions.checkNotNull(message, "message cannot be null.");
- Preconditions.checkNotNull(message.getCurrentMessage(), "message history cannot be null.");
- Preconditions.checkNotNull(threadId, "threadId cannot be null.");
- //ensure we have the right thread set
- message.setThreadId(threadId);
- MessageDbo db = mapper.map(message, MessageDbo.class);
-
- //insert a message history record
- MessageHistoryDbo histDb = mapper.map(message.getCurrentMessage(),
- MessageHistoryDbo.class);
-
- histDb = messageHistoryDao.save(histDb);
-
- Message result = mapper.map(messageDao.save(db), Message.class);
- result.setCurrentMessage(mapper.map(histDb, MessageHistory.class));
-
- return result;
- }
-
- public Message editMessage(Message message) {
- Preconditions.checkNotNull(message, "message cannot be null.");
- Preconditions.checkNotNull(message.getCurrentMessage(), "message history cannot be null.");
-
- MessageHistoryDbo histDb = mapper.map(message, MessageHistoryDbo.class);
- messageHistoryDao.save(histDb);
-
- return getMessage(message.getMessageId());
- }
-
- public void deleteMessagesForThread(Integer threadId) {
- MessageDboExample ex = new MessageDboExample();
- ex.createCriteria().andThreadIdEqualTo(threadId);
-
- List messages = messageDao.get(ex);
- List messageIds = messages.stream().map(MessageDbo::getPkId).collect(Collectors.toList());
- MessageHistoryDboExample hEx = new MessageHistoryDboExample();
- hEx.createCriteria().andMessageIdIn(messageIds);
-
- messageHistoryDao.delete(hEx);
- messageDao.delete(ex);
- }
-
- public void moveMessagesToNewThread(List messageIds, Integer newThreadId) {
- MessageDboExample ex = new MessageDboExample();
- ex.createCriteria().andMessageIdIn(messageIds);
-
- List messages = messageDao.get(ex);
- messages.forEach(msg -> {
- msg.setThreadId(newThreadId);
- messageDao.save(msg);
- });
- }
-
- public Long getTotalPostsInThread(Integer threadId) {
- MessageDboExample ex = new MessageDboExample();
- ex.createCriteria().andThreadIdEqualTo(threadId);
- Long count = messageDao.getMapper().countByExample(ex);
-
- return count;
- }
+package com.zfgc.zfgbb.dataprovider.forum;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Streams;
+import com.zfgc.zfgbb.dao.forum.CurrentMessageDao;
+import com.zfgc.zfgbb.dao.forum.MessageDao;
+import com.zfgc.zfgbb.dao.forum.MessageHistoryDao;
+import com.zfgc.zfgbb.dao.users.UserDao;
+import com.zfgc.zfgbb.dataprovider.AbstractDataProvider;
+import com.zfgc.zfgbb.dataprovider.users.UserDataProvider;
+import com.zfgc.zfgbb.dbo.CurrentMessageDboExample;
+import com.zfgc.zfgbb.dbo.MessageDbo;
+import com.zfgc.zfgbb.dbo.MessageDboExample;
+import com.zfgc.zfgbb.dbo.MessageHistoryDbo;
+import com.zfgc.zfgbb.dbo.MessageHistoryDboExample;
+import com.zfgc.zfgbb.model.User;
+import com.zfgc.zfgbb.model.forum.Message;
+import com.zfgc.zfgbb.model.forum.MessageHistory;
+
+@Repository
+public class MessageDataProvider extends AbstractDataProvider {
+ @Autowired
+ private MessageDao messageDao;
+
+ @Autowired
+ private MessageHistoryDao messageHistoryDao;
+
+ @Autowired
+ private CurrentMessageDao currentMessageDao;
+
+ @Autowired
+ private UserDataProvider userDataProvider;
+
+ public Message getMessage(Integer messageId) {
+ Message message = mapper.map(messageDao.get(messageId), Message.class);
+ MessageHistoryDboExample ex = new MessageHistoryDboExample();
+ ex.createCriteria().andMessageIdEqualTo(messageId).andCurrentFlagEqualTo(true);
+ List history = super.convertDboListToModel(messageHistoryDao.get(ex), MessageHistory.class);
+ message.setCurrentMessage(history.get(0));
+
+ return message;
+ }
+
+ public Message saveMessage(Message message) {
+ MessageDbo messageDbo = mapper.map(message, MessageDbo.class);
+
+ messageDbo = messageDao.save(messageDbo);
+
+ MessageHistory history = message.getCurrentMessage();
+ history.setMessageId(messageDbo.getMessageId());
+ MessageHistoryDbo historyDbo = mapper.map(history, MessageHistoryDbo.class);
+ historyDbo.setMessageText(history.getUnparsedText());
+ historyDbo = messageHistoryDao.save(historyDbo);
+
+ Message result = mapper.map(messageDbo, Message.class);
+ result.setCurrentMessage(mapper.map(historyDbo, MessageHistory.class));
+
+ return result;
+ }
+
+ public List getMessagesForThread(Integer threadId, Integer page, Integer count){
+ Integer start = ((page - 1)*count) + 1;
+ CurrentMessageDboExample ex = new CurrentMessageDboExample();
+ ex.createCriteria().andThreadIdEqualTo(threadId)
+ .andPostInThreadBetween(start, start + count);
+
+
+
+ List messages = currentMessageDao.get(ex)
+ .stream()
+ .map(message -> {
+ Message msg = mapper.map(message, Message.class);
+ MessageHistory hist = mapper.map(message, MessageHistory.class);
+ hist.setUnparsedText(hist.getMessageText());
+ msg.setCurrentMessage(hist);
+
+ msg.setCreatedUser(userDataProvider.getUser(msg.getOwnerId(), null));
+
+ return msg;
+ }).collect(Collectors.toList());
+
+
+
+ return super.convertDboListToModel(messages, Message.class);
+ }
+
+ public Message postMessageToThread(Integer threadId, Message message) {
+ Preconditions.checkNotNull(message, "message cannot be null.");
+ Preconditions.checkNotNull(message.getCurrentMessage(), "message history cannot be null.");
+ Preconditions.checkNotNull(threadId, "threadId cannot be null.");
+ //ensure we have the right thread set
+ message.setThreadId(threadId);
+ MessageDbo db = mapper.map(message, MessageDbo.class);
+
+ //insert a message history record
+ MessageHistoryDbo histDb = mapper.map(message.getCurrentMessage(),
+ MessageHistoryDbo.class);
+
+ histDb = messageHistoryDao.save(histDb);
+
+ Message result = mapper.map(messageDao.save(db), Message.class);
+ result.setCurrentMessage(mapper.map(histDb, MessageHistory.class));
+
+ return result;
+ }
+
+ public Message editMessage(Message message) {
+ Preconditions.checkNotNull(message, "message cannot be null.");
+ Preconditions.checkNotNull(message.getCurrentMessage(), "message history cannot be null.");
+
+ MessageHistoryDbo histDb = mapper.map(message, MessageHistoryDbo.class);
+ messageHistoryDao.save(histDb);
+
+ return getMessage(message.getMessageId());
+ }
+
+ public void deleteMessagesForThread(Integer threadId) {
+ MessageDboExample ex = new MessageDboExample();
+ ex.createCriteria().andThreadIdEqualTo(threadId);
+
+ List messages = messageDao.get(ex);
+ List messageIds = messages.stream().map(MessageDbo::getPkId).collect(Collectors.toList());
+ MessageHistoryDboExample hEx = new MessageHistoryDboExample();
+ hEx.createCriteria().andMessageIdIn(messageIds);
+
+ messageHistoryDao.delete(hEx);
+ messageDao.delete(ex);
+ }
+
+ public void moveMessagesToNewThread(List messageIds, Integer newThreadId) {
+ MessageDboExample ex = new MessageDboExample();
+ ex.createCriteria().andMessageIdIn(messageIds);
+
+ List messages = messageDao.get(ex);
+ messages.forEach(msg -> {
+ msg.setThreadId(newThreadId);
+ messageDao.save(msg);
+ });
+ }
+
+ public Long getTotalPostsInThread(Integer threadId) {
+ MessageDboExample ex = new MessageDboExample();
+ ex.createCriteria().andThreadIdEqualTo(threadId);
+ Long count = messageDao.getMapper().countByExample(ex);
+
+ return count;
+ }
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dataprovider/forum/ThreadDataProvider.java b/src/main/java/com/zfgc/zfgbb/dataprovider/forum/ThreadDataProvider.java
index 1327ec3..74c18e8 100644
--- a/src/main/java/com/zfgc/zfgbb/dataprovider/forum/ThreadDataProvider.java
+++ b/src/main/java/com/zfgc/zfgbb/dataprovider/forum/ThreadDataProvider.java
@@ -19,6 +19,8 @@
import com.zfgc.zfgbb.dataprovider.AbstractDataProvider;
import com.zfgc.zfgbb.dbo.BoardPermissionViewDboExample;
import com.zfgc.zfgbb.dbo.CurrentMessageDboExample;
+import com.zfgc.zfgbb.dbo.LatestMessageInThreadViewDbo;
+import com.zfgc.zfgbb.dbo.LatestMessageInThreadViewDboExample;
import com.zfgc.zfgbb.dbo.MessageDbo;
import com.zfgc.zfgbb.dbo.MessageDboExample;
import com.zfgc.zfgbb.dbo.MessageHistoryDbo;
@@ -30,7 +32,9 @@
import com.zfgc.zfgbb.dbo.ThreadDbo;
import com.zfgc.zfgbb.dbo.ThreadDboExample;
import com.zfgc.zfgbb.dbo.UserDboExample;
+import com.zfgc.zfgbb.mappers.LatestMessageInThreadViewDboMapper;
import com.zfgc.zfgbb.model.User;
+import com.zfgc.zfgbb.model.forum.LatestMessage;
import com.zfgc.zfgbb.model.forum.Message;
import com.zfgc.zfgbb.model.forum.MessageHistory;
import com.zfgc.zfgbb.model.forum.Poll;
@@ -60,6 +64,9 @@ public class ThreadDataProvider extends AbstractDataProvider {
@Autowired
private UserDao userDao;
+ @Autowired
+ private LatestMessageInThreadViewDboMapper latestMessageMapper;
+
public Thread getThread(Integer threadId, Integer page, Integer count) {
ThreadDbo threadDb = threadDao.get(threadId);
Thread result = null;
@@ -96,14 +103,26 @@ public Poll getPollInfo(Integer threadId) {
return result;
}
- public List getThreadsByBoardId(Integer boardId, Boolean sticky){
+ public List getThreadsByBoardId(Integer boardId, Integer pageNo, Integer threadsPerPage, Boolean sticky){
ThreadDboExample exT = new ThreadDboExample();
+ if(pageNo != null && threadsPerPage != null) {
+ exT.setLimit(threadsPerPage);
+ exT.setOffset((pageNo - 1) * threadsPerPage);
+ }
exT.createCriteria().andBoardIdEqualTo(boardId).andPinnedFlagEqualTo(sticky);
List result = super.convertDboListToModel(threadDao.get(exT), Thread.class);
result.forEach(th -> {
th.setCreatedUser(super.mapper.map(userDao.get(th.getCreatedUserId()), User.class));
+ th.setPostCount(messageDataProvider.getTotalPostsInThread(th.getThreadId()).intValue());
+
+ LatestMessageInThreadViewDboExample ex = new LatestMessageInThreadViewDboExample();
+ ex.createCriteria().andThreadIdEqualTo(th.getThreadId());
+ LatestMessageInThreadViewDbo latestDbo = latestMessageMapper.selectByExample(ex).stream().findFirst().orElse(null);
+ if(latestDbo != null) {
+ th.setLatestMessage(mapper.map(latestDbo, LatestMessage.class));
+ }
});
return result;
diff --git a/src/main/java/com/zfgc/zfgbb/dataprovider/users/UserDataProvider.java b/src/main/java/com/zfgc/zfgbb/dataprovider/users/UserDataProvider.java
index d0386db..e3da264 100644
--- a/src/main/java/com/zfgc/zfgbb/dataprovider/users/UserDataProvider.java
+++ b/src/main/java/com/zfgc/zfgbb/dataprovider/users/UserDataProvider.java
@@ -1,90 +1,131 @@
-package com.zfgc.zfgbb.dataprovider.users;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Repository;
-
-import com.zfgc.zfgbb.dao.users.EmailAddressDao;
-import com.zfgc.zfgbb.dao.users.UserBioInfoDao;
-import com.zfgc.zfgbb.dao.users.UserDao;
-import com.zfgc.zfgbb.dao.UserPermissionViewDao;
-import com.zfgc.zfgbb.dataprovider.AbstractDataProvider;
-import com.zfgc.zfgbb.dbo.EmailAddressDbo;
-import com.zfgc.zfgbb.dbo.UserBioInfoDbo;
-import com.zfgc.zfgbb.dbo.UserDbo;
-import com.zfgc.zfgbb.dbo.UserDboExample;
-import com.zfgc.zfgbb.dbo.UserPermissionViewDboExample;
-import com.zfgc.zfgbb.model.User;
-import com.zfgc.zfgbb.model.users.Permission;
-import com.zfgc.zfgbb.model.users.UserBioInfo;
-
-@Repository
-public class UserDataProvider extends AbstractDataProvider {
-
- @Autowired
- private UserDao userDao;
-
- @Autowired
- private UserPermissionViewDao userPermissionDao;
-
- @Autowired
- private EmailAddressDao emailDao;
-
- @Autowired
- private UserBioInfoDao bioInfoDao;
-
- public User getUser(String userName) {
- UserDboExample ex = new UserDboExample();
- ex.createCriteria().andUserNameEqualTo(userName).andActiveFlagEqualTo(true);
- UserDbo userDb = userDao.get(ex).stream().findFirst().orElse(createGuest());
-
- return getUser(userDb.getPkId());
- }
-
- public User getUser(Integer userId) {
- UserDboExample ex = new UserDboExample();
- ex.createCriteria().andUserIdEqualTo(userId).andActiveFlagEqualTo(true);
- UserDbo userDb = userDao.get(ex).stream().findFirst().orElse(createGuest());
-
- User user = mapper.map(userDb, User.class);
-
- //todo: setup guest permissions
- UserPermissionViewDboExample upEx = new UserPermissionViewDboExample();
- upEx.createCriteria().andUserIdEqualTo(user.getUserId());
- List permissions = convertDboListToModel(userPermissionDao.get(upEx), Permission.class);
-
- user.setPermissions(permissions);
-
- UserBioInfoDbo bioInfoDbo = bioInfoDao.get(userId);
- user.setBioInfo(mapper.map(bioInfoDbo, UserBioInfo.class));
-
- return user;
- }
-
- public User createUser(User user) {
- UserDbo userDbo = mapper.map(user, UserDbo.class);
- userDao.save(userDbo);
-
- //create bio info
- UserBioInfoDbo bioInfo = mapper.map(user.getBioInfo(), UserBioInfoDbo.class);
- bioInfo.setUserId(userDbo.getPkId());
- bioInfoDao.save(bioInfo);
-
- EmailAddressDbo emailDbo = mapper.map(user.getEmail(), EmailAddressDbo.class);
- emailDbo.setUserId(userDbo.getPkId());
- emailDao.save(emailDbo);
-
- return getUser(userDbo.getPkId());
- }
-
- public UserDbo createGuest() {
- UserDbo user = new UserDbo();
- user.setUserId(-1);
- user.setDisplayName("Guest");
-
- return user;
- }
-
+package com.zfgc.zfgbb.dataprovider.users;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Optional;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Repository;
+
+import com.zfgc.zfgbb.dao.users.AvatarDao;
+import com.zfgc.zfgbb.dao.users.EmailAddressDao;
+import com.zfgc.zfgbb.dao.users.UserBioInfoDao;
+import com.zfgc.zfgbb.dao.users.UserDao;
+import com.zfgc.zfgbb.config.loadoption.user.BasicUserLoadOptions;
+import com.zfgc.zfgbb.config.loadoption.user.FullUserLoadOptions;
+import com.zfgc.zfgbb.config.loadoption.user.LoggedInUserLoadOptions;
+import com.zfgc.zfgbb.dao.UserPermissionViewDao;
+import com.zfgc.zfgbb.dataprovider.AbstractDataProvider;
+import com.zfgc.zfgbb.dbo.AvatarDbo;
+import com.zfgc.zfgbb.dbo.AvatarDboExample;
+import com.zfgc.zfgbb.dbo.EmailAddressDbo;
+import com.zfgc.zfgbb.dbo.UserBioInfoDbo;
+import com.zfgc.zfgbb.dbo.UserDbo;
+import com.zfgc.zfgbb.dbo.UserDboExample;
+import com.zfgc.zfgbb.dbo.UserPermissionViewDboExample;
+import com.zfgc.zfgbb.model.User;
+import com.zfgc.zfgbb.model.users.Avatar;
+import com.zfgc.zfgbb.model.users.Permission;
+import com.zfgc.zfgbb.model.users.UserBioInfo;
+
+@Repository
+public class UserDataProvider extends AbstractDataProvider {
+
+ @Autowired
+ private UserDao userDao;
+
+ @Autowired
+ private UserPermissionViewDao userPermissionDao;
+
+ @Autowired
+ private EmailAddressDao emailDao;
+
+ @Autowired
+ private UserBioInfoDao bioInfoDao;
+
+ @Autowired
+ private AvatarDao avatarDao;
+
+ public User getUser(String userName) {
+ UserDboExample ex = new UserDboExample();
+ ex.createCriteria().andUserNameEqualTo(userName).andActiveFlagEqualTo(true);
+ UserDbo userDb = userDao.get(ex).stream().findFirst().orElse(createGuest());
+
+ return getUser(userDb.getPkId(), new LoggedInUserLoadOptions());
+ }
+
+ public User getUser(Integer userId, BasicUserLoadOptions loadOptions) {
+ if(loadOptions == null) {
+ loadOptions = new BasicUserLoadOptions();
+ }
+
+ UserDboExample ex = new UserDboExample();
+ ex.createCriteria().andUserIdEqualTo(userId).andActiveFlagEqualTo(true);
+ UserDbo userDb = userDao.get(ex).stream().findFirst().orElse(createGuest());
+
+ User user = mapper.map(userDb, User.class);
+
+ //todo: setup guest permissions
+ if(Boolean.TRUE.equals(loadOptions.loadPermissions())){
+ UserPermissionViewDboExample upEx = new UserPermissionViewDboExample();
+ upEx.createCriteria().andUserIdEqualTo(user.getUserId());
+ List permissions = convertDboListToModel(userPermissionDao.get(upEx), Permission.class);
+
+ user.setPermissions(permissions);
+ }
+
+ if(Boolean.TRUE.equals(loadOptions.loadBio())) {
+ UserBioInfoDbo bioInfoDbo = bioInfoDao.get(userId);
+ user.setBioInfo(mapper.map(bioInfoDbo, UserBioInfo.class));
+ }
+
+ if(Boolean.TRUE.equals(loadOptions.loadAvatar())) {
+ AvatarDboExample avatarEx = new AvatarDboExample();
+ avatarEx.createCriteria().andUserIdEqualTo(userId)
+ .andActiveFlagEqualTo(true);
+
+ Optional avDb = avatarDao.get(avatarEx).stream().findFirst();
+ Avatar av = avDb.map((a) -> mapper.map(a, Avatar.class)).orElse(null);
+ user.setAvatar(av);
+ }
+
+ return user;
+ }
+
+ public User createUser(User user) {
+ UserDbo userDbo = mapper.map(user, UserDbo.class);
+ userDao.save(userDbo);
+
+ //create bio info
+ UserBioInfoDbo bioInfo = mapper.map(user.getBioInfo(), UserBioInfoDbo.class);
+ bioInfo.setUserId(userDbo.getPkId());
+ bioInfoDao.save(bioInfo);
+
+ EmailAddressDbo emailDbo = mapper.map(user.getEmail(), EmailAddressDbo.class);
+ emailDbo.setUserId(userDbo.getPkId());
+ emailDao.save(emailDbo);
+
+ return getUser(userDbo.getPkId(), new FullUserLoadOptions());
+ }
+
+ public UserDbo createGuest() {
+ UserDbo user = new UserDbo();
+ user.setUserId(-1);
+ user.setDisplayName("Guest");
+
+ return user;
+ }
+
+ public User saveUserProfile(User user) {
+ UserDbo userDbo = mapper.map(user, UserDbo.class);
+ userDbo = userDao.save(userDbo);
+
+ if(user.getBioInfo() != null) {
+ UserBioInfoDbo bioInfoDbo = mapper.map(user.getBioInfo(), UserBioInfoDbo.class);
+ bioInfoDao.save(bioInfoDbo);
+ }
+
+ return getUser(userDbo.getUserId(), null);
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dbo/AbstractDbo.java b/src/main/java/com/zfgc/zfgbb/dbo/AbstractDbo.java
index 2fc8c88..98e9d68 100644
--- a/src/main/java/com/zfgc/zfgbb/dbo/AbstractDbo.java
+++ b/src/main/java/com/zfgc/zfgbb/dbo/AbstractDbo.java
@@ -1,11 +1,11 @@
-package com.zfgc.zfgbb.dbo;
-
-import java.time.LocalDateTime;
-
-public abstract class AbstractDbo {
-
- public abstract Integer getPkId();
- public abstract LocalDateTime getUpdatedTime();
- public abstract LocalDateTime getCreatedTime();
-
+package com.zfgc.zfgbb.dbo;
+
+import java.time.LocalDateTime;
+
+public abstract class AbstractDbo {
+
+ public abstract Integer getPkId();
+ public abstract LocalDateTime getUpdatedTime();
+ public abstract LocalDateTime getCreatedTime();
+
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dbo/AttributeDataTypeDbo.java b/src/main/java/com/zfgc/zfgbb/dbo/AttributeDataTypeDbo.java
index d9b4311..e98dc90 100644
--- a/src/main/java/com/zfgc/zfgbb/dbo/AttributeDataTypeDbo.java
+++ b/src/main/java/com/zfgc/zfgbb/dbo/AttributeDataTypeDbo.java
@@ -1,116 +1,116 @@
-package com.zfgc.zfgbb.dbo;
-
-import java.time.LocalDate;
-
-import com.zfgc.zfgbb.dbo.AbstractDbo;
-import java.time.LocalDateTime;
-
-public class AttributeDataTypeDbo extends AbstractDbo {
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.attribute_data_type.attribute_data_type_id
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- private Integer attributeDataTypeId;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.attribute_data_type.type_name
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- private String typeName;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.attribute_data_type.created_ts
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- private LocalDateTime createdTs;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.attribute_data_type.updated_ts
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- private LocalDateTime updatedTs;
-
- /**
- * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.attribute_data_type.attribute_data_type_id
- * @return the value of zfgbb.attribute_data_type.attribute_data_type_id
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public Integer getAttributeDataTypeId() {
- return attributeDataTypeId;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.attribute_data_type.attribute_data_type_id
- * @param attributeDataTypeId the value for zfgbb.attribute_data_type.attribute_data_type_id
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setAttributeDataTypeId(Integer attributeDataTypeId) {
- this.attributeDataTypeId = attributeDataTypeId;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.attribute_data_type.type_name
- * @return the value of zfgbb.attribute_data_type.type_name
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public String getTypeName() {
- return typeName;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.attribute_data_type.type_name
- * @param typeName the value for zfgbb.attribute_data_type.type_name
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setTypeName(String typeName) {
- this.typeName = typeName;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.attribute_data_type.created_ts
- * @return the value of zfgbb.attribute_data_type.created_ts
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public LocalDateTime getCreatedTs() {
- return createdTs;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.attribute_data_type.created_ts
- * @param createdTs the value for zfgbb.attribute_data_type.created_ts
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setCreatedTs(LocalDateTime createdTs) {
- this.createdTs = createdTs;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.attribute_data_type.updated_ts
- * @return the value of zfgbb.attribute_data_type.updated_ts
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public LocalDateTime getUpdatedTs() {
- return updatedTs;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.attribute_data_type.updated_ts
- * @param updatedTs the value for zfgbb.attribute_data_type.updated_ts
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setUpdatedTs(LocalDateTime updatedTs) {
- this.updatedTs = updatedTs;
- }
-
- @Override
- public Integer getPkId() {
- return attributeDataTypeId;
- }
-
- @Override
- public LocalDateTime getUpdatedTime() {
- return updatedTs;
- }
-
- @Override
- public LocalDateTime getCreatedTime() {
- return createdTs;
- }
+package com.zfgc.zfgbb.dbo;
+
+import java.time.LocalDate;
+
+import com.zfgc.zfgbb.dbo.AbstractDbo;
+import java.time.LocalDateTime;
+
+public class AttributeDataTypeDbo extends AbstractDbo {
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.attribute_data_type.attribute_data_type_id
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ private Integer attributeDataTypeId;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.attribute_data_type.type_name
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ private String typeName;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.attribute_data_type.created_ts
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ private LocalDateTime createdTs;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.attribute_data_type.updated_ts
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ private LocalDateTime updatedTs;
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.attribute_data_type.attribute_data_type_id
+ * @return the value of zfgbb.attribute_data_type.attribute_data_type_id
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public Integer getAttributeDataTypeId() {
+ return attributeDataTypeId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.attribute_data_type.attribute_data_type_id
+ * @param attributeDataTypeId the value for zfgbb.attribute_data_type.attribute_data_type_id
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setAttributeDataTypeId(Integer attributeDataTypeId) {
+ this.attributeDataTypeId = attributeDataTypeId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.attribute_data_type.type_name
+ * @return the value of zfgbb.attribute_data_type.type_name
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public String getTypeName() {
+ return typeName;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.attribute_data_type.type_name
+ * @param typeName the value for zfgbb.attribute_data_type.type_name
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setTypeName(String typeName) {
+ this.typeName = typeName;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.attribute_data_type.created_ts
+ * @return the value of zfgbb.attribute_data_type.created_ts
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public LocalDateTime getCreatedTs() {
+ return createdTs;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.attribute_data_type.created_ts
+ * @param createdTs the value for zfgbb.attribute_data_type.created_ts
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setCreatedTs(LocalDateTime createdTs) {
+ this.createdTs = createdTs;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.attribute_data_type.updated_ts
+ * @return the value of zfgbb.attribute_data_type.updated_ts
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public LocalDateTime getUpdatedTs() {
+ return updatedTs;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.attribute_data_type.updated_ts
+ * @param updatedTs the value for zfgbb.attribute_data_type.updated_ts
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setUpdatedTs(LocalDateTime updatedTs) {
+ this.updatedTs = updatedTs;
+ }
+
+ @Override
+ public Integer getPkId() {
+ return attributeDataTypeId;
+ }
+
+ @Override
+ public LocalDateTime getUpdatedTime() {
+ return updatedTs;
+ }
+
+ @Override
+ public LocalDateTime getCreatedTime() {
+ return createdTs;
+ }
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dbo/AttributeDataTypeDboExample.java b/src/main/java/com/zfgc/zfgbb/dbo/AttributeDataTypeDboExample.java
index bd9cf31..79e43e4 100644
--- a/src/main/java/com/zfgc/zfgbb/dbo/AttributeDataTypeDboExample.java
+++ b/src/main/java/com/zfgc/zfgbb/dbo/AttributeDataTypeDboExample.java
@@ -1,512 +1,512 @@
-package com.zfgc.zfgbb.dbo;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-
-public class AttributeDataTypeDboExample {
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database table zfgbb.attribute_data_type
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- protected String orderByClause;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database table zfgbb.attribute_data_type
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- protected boolean distinct;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database table zfgbb.attribute_data_type
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- protected List oredCriteria;
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public AttributeDataTypeDboExample() {
- oredCriteria = new ArrayList<>();
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setOrderByClause(String orderByClause) {
- this.orderByClause = orderByClause;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public String getOrderByClause() {
- return orderByClause;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setDistinct(boolean distinct) {
- this.distinct = distinct;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public boolean isDistinct() {
- return distinct;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public List getOredCriteria() {
- return oredCriteria;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void or(Criteria criteria) {
- oredCriteria.add(criteria);
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public Criteria or() {
- Criteria criteria = createCriteriaInternal();
- oredCriteria.add(criteria);
- return criteria;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public Criteria createCriteria() {
- Criteria criteria = createCriteriaInternal();
- if (oredCriteria.size() == 0) {
- oredCriteria.add(criteria);
- }
- return criteria;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- protected Criteria createCriteriaInternal() {
- Criteria criteria = new Criteria();
- return criteria;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void clear() {
- oredCriteria.clear();
- orderByClause = null;
- distinct = false;
- }
-
- /**
- * This class was generated by MyBatis Generator. This class corresponds to the database table zfgbb.attribute_data_type
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- protected abstract static class GeneratedCriteria {
- protected List criteria;
-
- protected GeneratedCriteria() {
- super();
- criteria = new ArrayList<>();
- }
-
- public boolean isValid() {
- return criteria.size() > 0;
- }
-
- public List getAllCriteria() {
- return criteria;
- }
-
- public List getCriteria() {
- return criteria;
- }
-
- protected void addCriterion(String condition) {
- if (condition == null) {
- throw new RuntimeException("Value for condition cannot be null");
- }
- criteria.add(new Criterion(condition));
- }
-
- protected void addCriterion(String condition, Object value, String property) {
- if (value == null) {
- throw new RuntimeException("Value for " + property + " cannot be null");
- }
- criteria.add(new Criterion(condition, value));
- }
-
- protected void addCriterion(String condition, Object value1, Object value2, String property) {
- if (value1 == null || value2 == null) {
- throw new RuntimeException("Between values for " + property + " cannot be null");
- }
- criteria.add(new Criterion(condition, value1, value2));
- }
-
- public Criteria andAttributeDataTypeIdIsNull() {
- addCriterion("attribute_data_type_id is null");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeIdIsNotNull() {
- addCriterion("attribute_data_type_id is not null");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeIdEqualTo(Integer value) {
- addCriterion("attribute_data_type_id =", value, "attributeDataTypeId");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeIdNotEqualTo(Integer value) {
- addCriterion("attribute_data_type_id <>", value, "attributeDataTypeId");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeIdGreaterThan(Integer value) {
- addCriterion("attribute_data_type_id >", value, "attributeDataTypeId");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeIdGreaterThanOrEqualTo(Integer value) {
- addCriterion("attribute_data_type_id >=", value, "attributeDataTypeId");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeIdLessThan(Integer value) {
- addCriterion("attribute_data_type_id <", value, "attributeDataTypeId");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeIdLessThanOrEqualTo(Integer value) {
- addCriterion("attribute_data_type_id <=", value, "attributeDataTypeId");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeIdIn(List values) {
- addCriterion("attribute_data_type_id in", values, "attributeDataTypeId");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeIdNotIn(List values) {
- addCriterion("attribute_data_type_id not in", values, "attributeDataTypeId");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeIdBetween(Integer value1, Integer value2) {
- addCriterion("attribute_data_type_id between", value1, value2, "attributeDataTypeId");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeIdNotBetween(Integer value1, Integer value2) {
- addCriterion("attribute_data_type_id not between", value1, value2, "attributeDataTypeId");
- return (Criteria) this;
- }
-
- public Criteria andTypeNameIsNull() {
- addCriterion("type_name is null");
- return (Criteria) this;
- }
-
- public Criteria andTypeNameIsNotNull() {
- addCriterion("type_name is not null");
- return (Criteria) this;
- }
-
- public Criteria andTypeNameEqualTo(String value) {
- addCriterion("type_name =", value, "typeName");
- return (Criteria) this;
- }
-
- public Criteria andTypeNameNotEqualTo(String value) {
- addCriterion("type_name <>", value, "typeName");
- return (Criteria) this;
- }
-
- public Criteria andTypeNameGreaterThan(String value) {
- addCriterion("type_name >", value, "typeName");
- return (Criteria) this;
- }
-
- public Criteria andTypeNameGreaterThanOrEqualTo(String value) {
- addCriterion("type_name >=", value, "typeName");
- return (Criteria) this;
- }
-
- public Criteria andTypeNameLessThan(String value) {
- addCriterion("type_name <", value, "typeName");
- return (Criteria) this;
- }
-
- public Criteria andTypeNameLessThanOrEqualTo(String value) {
- addCriterion("type_name <=", value, "typeName");
- return (Criteria) this;
- }
-
- public Criteria andTypeNameLike(String value) {
- addCriterion("type_name like", value, "typeName");
- return (Criteria) this;
- }
-
- public Criteria andTypeNameNotLike(String value) {
- addCriterion("type_name not like", value, "typeName");
- return (Criteria) this;
- }
-
- public Criteria andTypeNameIn(List values) {
- addCriterion("type_name in", values, "typeName");
- return (Criteria) this;
- }
-
- public Criteria andTypeNameNotIn(List values) {
- addCriterion("type_name not in", values, "typeName");
- return (Criteria) this;
- }
-
- public Criteria andTypeNameBetween(String value1, String value2) {
- addCriterion("type_name between", value1, value2, "typeName");
- return (Criteria) this;
- }
-
- public Criteria andTypeNameNotBetween(String value1, String value2) {
- addCriterion("type_name not between", value1, value2, "typeName");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsIsNull() {
- addCriterion("created_ts is null");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsIsNotNull() {
- addCriterion("created_ts is not null");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsEqualTo(LocalDateTime value) {
- addCriterion("created_ts =", value, "createdTs");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsNotEqualTo(LocalDateTime value) {
- addCriterion("created_ts <>", value, "createdTs");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsGreaterThan(LocalDateTime value) {
- addCriterion("created_ts >", value, "createdTs");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsGreaterThanOrEqualTo(LocalDateTime value) {
- addCriterion("created_ts >=", value, "createdTs");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsLessThan(LocalDateTime value) {
- addCriterion("created_ts <", value, "createdTs");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsLessThanOrEqualTo(LocalDateTime value) {
- addCriterion("created_ts <=", value, "createdTs");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsIn(List values) {
- addCriterion("created_ts in", values, "createdTs");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsNotIn(List values) {
- addCriterion("created_ts not in", values, "createdTs");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsBetween(LocalDateTime value1, LocalDateTime value2) {
- addCriterion("created_ts between", value1, value2, "createdTs");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsNotBetween(LocalDateTime value1, LocalDateTime value2) {
- addCriterion("created_ts not between", value1, value2, "createdTs");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsIsNull() {
- addCriterion("updated_ts is null");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsIsNotNull() {
- addCriterion("updated_ts is not null");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsEqualTo(LocalDateTime value) {
- addCriterion("updated_ts =", value, "updatedTs");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsNotEqualTo(LocalDateTime value) {
- addCriterion("updated_ts <>", value, "updatedTs");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsGreaterThan(LocalDateTime value) {
- addCriterion("updated_ts >", value, "updatedTs");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsGreaterThanOrEqualTo(LocalDateTime value) {
- addCriterion("updated_ts >=", value, "updatedTs");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsLessThan(LocalDateTime value) {
- addCriterion("updated_ts <", value, "updatedTs");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsLessThanOrEqualTo(LocalDateTime value) {
- addCriterion("updated_ts <=", value, "updatedTs");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsIn(List values) {
- addCriterion("updated_ts in", values, "updatedTs");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsNotIn(List values) {
- addCriterion("updated_ts not in", values, "updatedTs");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsBetween(LocalDateTime value1, LocalDateTime value2) {
- addCriterion("updated_ts between", value1, value2, "updatedTs");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsNotBetween(LocalDateTime value1, LocalDateTime value2) {
- addCriterion("updated_ts not between", value1, value2, "updatedTs");
- return (Criteria) this;
- }
- }
-
- /**
- * This class was generated by MyBatis Generator. This class corresponds to the database table zfgbb.attribute_data_type
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public static class Criterion {
- private String condition;
- private Object value;
- private Object secondValue;
- private boolean noValue;
- private boolean singleValue;
- private boolean betweenValue;
- private boolean listValue;
- private String typeHandler;
-
- public String getCondition() {
- return condition;
- }
-
- public Object getValue() {
- return value;
- }
-
- public Object getSecondValue() {
- return secondValue;
- }
-
- public boolean isNoValue() {
- return noValue;
- }
-
- public boolean isSingleValue() {
- return singleValue;
- }
-
- public boolean isBetweenValue() {
- return betweenValue;
- }
-
- public boolean isListValue() {
- return listValue;
- }
-
- public String getTypeHandler() {
- return typeHandler;
- }
-
- protected Criterion(String condition) {
- super();
- this.condition = condition;
- this.typeHandler = null;
- this.noValue = true;
- }
-
- protected Criterion(String condition, Object value, String typeHandler) {
- super();
- this.condition = condition;
- this.value = value;
- this.typeHandler = typeHandler;
- if (value instanceof List>) {
- this.listValue = true;
- } else {
- this.singleValue = true;
- }
- }
-
- protected Criterion(String condition, Object value) {
- this(condition, value, null);
- }
-
- protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
- super();
- this.condition = condition;
- this.value = value;
- this.secondValue = secondValue;
- this.typeHandler = typeHandler;
- this.betweenValue = true;
- }
-
- protected Criterion(String condition, Object value, Object secondValue) {
- this(condition, value, secondValue, null);
- }
- }
-
- /**
- * This class was generated by MyBatis Generator.
- * This class corresponds to the database table zfgbb.attribute_data_type
- *
- * @mbg.generated do_not_delete_during_merge Fri Feb 25 00:15:45 EST 2022
- */
- public static class Criteria extends GeneratedCriteria {
- protected Criteria() {
- super();
- }
- }
+package com.zfgc.zfgbb.dbo;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+public class AttributeDataTypeDboExample {
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database table zfgbb.attribute_data_type
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ protected String orderByClause;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database table zfgbb.attribute_data_type
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ protected boolean distinct;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database table zfgbb.attribute_data_type
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ protected List oredCriteria;
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public AttributeDataTypeDboExample() {
+ oredCriteria = new ArrayList<>();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public List getOredCriteria() {
+ return oredCriteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.attribute_data_type
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ /**
+ * This class was generated by MyBatis Generator. This class corresponds to the database table zfgbb.attribute_data_type
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ protected abstract static class GeneratedCriteria {
+ protected List criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList<>();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List getAllCriteria() {
+ return criteria;
+ }
+
+ public List getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andAttributeDataTypeIdIsNull() {
+ addCriterion("attribute_data_type_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeIdIsNotNull() {
+ addCriterion("attribute_data_type_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeIdEqualTo(Integer value) {
+ addCriterion("attribute_data_type_id =", value, "attributeDataTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeIdNotEqualTo(Integer value) {
+ addCriterion("attribute_data_type_id <>", value, "attributeDataTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeIdGreaterThan(Integer value) {
+ addCriterion("attribute_data_type_id >", value, "attributeDataTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeIdGreaterThanOrEqualTo(Integer value) {
+ addCriterion("attribute_data_type_id >=", value, "attributeDataTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeIdLessThan(Integer value) {
+ addCriterion("attribute_data_type_id <", value, "attributeDataTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeIdLessThanOrEqualTo(Integer value) {
+ addCriterion("attribute_data_type_id <=", value, "attributeDataTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeIdIn(List values) {
+ addCriterion("attribute_data_type_id in", values, "attributeDataTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeIdNotIn(List values) {
+ addCriterion("attribute_data_type_id not in", values, "attributeDataTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeIdBetween(Integer value1, Integer value2) {
+ addCriterion("attribute_data_type_id between", value1, value2, "attributeDataTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeIdNotBetween(Integer value1, Integer value2) {
+ addCriterion("attribute_data_type_id not between", value1, value2, "attributeDataTypeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeNameIsNull() {
+ addCriterion("type_name is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeNameIsNotNull() {
+ addCriterion("type_name is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeNameEqualTo(String value) {
+ addCriterion("type_name =", value, "typeName");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeNameNotEqualTo(String value) {
+ addCriterion("type_name <>", value, "typeName");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeNameGreaterThan(String value) {
+ addCriterion("type_name >", value, "typeName");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeNameGreaterThanOrEqualTo(String value) {
+ addCriterion("type_name >=", value, "typeName");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeNameLessThan(String value) {
+ addCriterion("type_name <", value, "typeName");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeNameLessThanOrEqualTo(String value) {
+ addCriterion("type_name <=", value, "typeName");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeNameLike(String value) {
+ addCriterion("type_name like", value, "typeName");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeNameNotLike(String value) {
+ addCriterion("type_name not like", value, "typeName");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeNameIn(List values) {
+ addCriterion("type_name in", values, "typeName");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeNameNotIn(List values) {
+ addCriterion("type_name not in", values, "typeName");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeNameBetween(String value1, String value2) {
+ addCriterion("type_name between", value1, value2, "typeName");
+ return (Criteria) this;
+ }
+
+ public Criteria andTypeNameNotBetween(String value1, String value2) {
+ addCriterion("type_name not between", value1, value2, "typeName");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsIsNull() {
+ addCriterion("created_ts is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsIsNotNull() {
+ addCriterion("created_ts is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsEqualTo(LocalDateTime value) {
+ addCriterion("created_ts =", value, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsNotEqualTo(LocalDateTime value) {
+ addCriterion("created_ts <>", value, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsGreaterThan(LocalDateTime value) {
+ addCriterion("created_ts >", value, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsGreaterThanOrEqualTo(LocalDateTime value) {
+ addCriterion("created_ts >=", value, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsLessThan(LocalDateTime value) {
+ addCriterion("created_ts <", value, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsLessThanOrEqualTo(LocalDateTime value) {
+ addCriterion("created_ts <=", value, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsIn(List values) {
+ addCriterion("created_ts in", values, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsNotIn(List values) {
+ addCriterion("created_ts not in", values, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsBetween(LocalDateTime value1, LocalDateTime value2) {
+ addCriterion("created_ts between", value1, value2, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsNotBetween(LocalDateTime value1, LocalDateTime value2) {
+ addCriterion("created_ts not between", value1, value2, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsIsNull() {
+ addCriterion("updated_ts is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsIsNotNull() {
+ addCriterion("updated_ts is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsEqualTo(LocalDateTime value) {
+ addCriterion("updated_ts =", value, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsNotEqualTo(LocalDateTime value) {
+ addCriterion("updated_ts <>", value, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsGreaterThan(LocalDateTime value) {
+ addCriterion("updated_ts >", value, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsGreaterThanOrEqualTo(LocalDateTime value) {
+ addCriterion("updated_ts >=", value, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsLessThan(LocalDateTime value) {
+ addCriterion("updated_ts <", value, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsLessThanOrEqualTo(LocalDateTime value) {
+ addCriterion("updated_ts <=", value, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsIn(List values) {
+ addCriterion("updated_ts in", values, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsNotIn(List values) {
+ addCriterion("updated_ts not in", values, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsBetween(LocalDateTime value1, LocalDateTime value2) {
+ addCriterion("updated_ts between", value1, value2, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsNotBetween(LocalDateTime value1, LocalDateTime value2) {
+ addCriterion("updated_ts not between", value1, value2, "updatedTs");
+ return (Criteria) this;
+ }
+ }
+
+ /**
+ * This class was generated by MyBatis Generator. This class corresponds to the database table zfgbb.attribute_data_type
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public static class Criterion {
+ private String condition;
+ private Object value;
+ private Object secondValue;
+ private boolean noValue;
+ private boolean singleValue;
+ private boolean betweenValue;
+ private boolean listValue;
+ private String typeHandler;
+
+ public String getCondition() {
+ return condition;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object getSecondValue() {
+ return secondValue;
+ }
+
+ public boolean isNoValue() {
+ return noValue;
+ }
+
+ public boolean isSingleValue() {
+ return singleValue;
+ }
+
+ public boolean isBetweenValue() {
+ return betweenValue;
+ }
+
+ public boolean isListValue() {
+ return listValue;
+ }
+
+ public String getTypeHandler() {
+ return typeHandler;
+ }
+
+ protected Criterion(String condition) {
+ super();
+ this.condition = condition;
+ this.typeHandler = null;
+ this.noValue = true;
+ }
+
+ protected Criterion(String condition, Object value, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.typeHandler = typeHandler;
+ if (value instanceof List>) {
+ this.listValue = true;
+ } else {
+ this.singleValue = true;
+ }
+ }
+
+ protected Criterion(String condition, Object value) {
+ this(condition, value, null);
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.secondValue = secondValue;
+ this.typeHandler = typeHandler;
+ this.betweenValue = true;
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue) {
+ this(condition, value, secondValue, null);
+ }
+ }
+
+ /**
+ * This class was generated by MyBatis Generator.
+ * This class corresponds to the database table zfgbb.attribute_data_type
+ *
+ * @mbg.generated do_not_delete_during_merge Fri Feb 25 00:15:45 EST 2022
+ */
+ public static class Criteria extends GeneratedCriteria {
+ protected Criteria() {
+ super();
+ }
+ }
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dbo/AvatarDbo.java b/src/main/java/com/zfgc/zfgbb/dbo/AvatarDbo.java
new file mode 100644
index 0000000..202515e
--- /dev/null
+++ b/src/main/java/com/zfgc/zfgbb/dbo/AvatarDbo.java
@@ -0,0 +1,160 @@
+package com.zfgc.zfgbb.dbo;
+
+import java.time.LocalDateTime;
+
+public class AvatarDbo extends AbstractDbo {
+
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.avatar.avatar_id
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ private Integer avatarId;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.avatar.url
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ private String url;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.avatar.user_id
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ private Integer userId;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.avatar.active_flag
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ private Boolean activeFlag;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.avatar.created_ts
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ private LocalDateTime createdTs;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.avatar.updated_ts
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ private LocalDateTime updatedTs;
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.avatar.avatar_id
+ * @return the value of zfgbb.avatar.avatar_id
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public Integer getAvatarId() {
+ return avatarId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.avatar.avatar_id
+ * @param avatarId the value for zfgbb.avatar.avatar_id
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public void setAvatarId(Integer avatarId) {
+ this.avatarId = avatarId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.avatar.url
+ * @return the value of zfgbb.avatar.url
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public String getUrl() {
+ return url;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.avatar.url
+ * @param url the value for zfgbb.avatar.url
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.avatar.user_id
+ * @return the value of zfgbb.avatar.user_id
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public Integer getUserId() {
+ return userId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.avatar.user_id
+ * @param userId the value for zfgbb.avatar.user_id
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public void setUserId(Integer userId) {
+ this.userId = userId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.avatar.active_flag
+ * @return the value of zfgbb.avatar.active_flag
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public Boolean getActiveFlag() {
+ return activeFlag;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.avatar.active_flag
+ * @param activeFlag the value for zfgbb.avatar.active_flag
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public void setActiveFlag(Boolean activeFlag) {
+ this.activeFlag = activeFlag;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.avatar.created_ts
+ * @return the value of zfgbb.avatar.created_ts
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public LocalDateTime getCreatedTs() {
+ return createdTs;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.avatar.created_ts
+ * @param createdTs the value for zfgbb.avatar.created_ts
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public void setCreatedTs(LocalDateTime createdTs) {
+ this.createdTs = createdTs;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.avatar.updated_ts
+ * @return the value of zfgbb.avatar.updated_ts
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public LocalDateTime getUpdatedTs() {
+ return updatedTs;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.avatar.updated_ts
+ * @param updatedTs the value for zfgbb.avatar.updated_ts
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public void setUpdatedTs(LocalDateTime updatedTs) {
+ this.updatedTs = updatedTs;
+ }
+
+ @Override
+ public Integer getPkId() {
+ return avatarId;
+ }
+
+ @Override
+ public LocalDateTime getUpdatedTime() {
+ return updatedTs;
+ }
+
+ @Override
+ public LocalDateTime getCreatedTime() {
+ return createdTs;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dbo/AvatarDboExample.java b/src/main/java/com/zfgc/zfgbb/dbo/AvatarDboExample.java
new file mode 100644
index 0000000..754ab43
--- /dev/null
+++ b/src/main/java/com/zfgc/zfgbb/dbo/AvatarDboExample.java
@@ -0,0 +1,631 @@
+package com.zfgc.zfgbb.dbo;
+
+import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.List;
+
+public class AvatarDboExample {
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database table zfgbb.avatar
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ protected String orderByClause;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database table zfgbb.avatar
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ protected boolean distinct;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database table zfgbb.avatar
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ protected List oredCriteria;
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.avatar
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public AvatarDboExample() {
+ oredCriteria = new ArrayList<>();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.avatar
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.avatar
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.avatar
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.avatar
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.avatar
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public List getOredCriteria() {
+ return oredCriteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.avatar
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.avatar
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.avatar
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.avatar
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.avatar
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ /**
+ * This class was generated by MyBatis Generator. This class corresponds to the database table zfgbb.avatar
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ protected abstract static class GeneratedCriteria {
+ protected List criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList<>();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List getAllCriteria() {
+ return criteria;
+ }
+
+ public List getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andAvatarIdIsNull() {
+ addCriterion("avatar_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAvatarIdIsNotNull() {
+ addCriterion("avatar_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAvatarIdEqualTo(Integer value) {
+ addCriterion("avatar_id =", value, "avatarId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAvatarIdNotEqualTo(Integer value) {
+ addCriterion("avatar_id <>", value, "avatarId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAvatarIdGreaterThan(Integer value) {
+ addCriterion("avatar_id >", value, "avatarId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAvatarIdGreaterThanOrEqualTo(Integer value) {
+ addCriterion("avatar_id >=", value, "avatarId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAvatarIdLessThan(Integer value) {
+ addCriterion("avatar_id <", value, "avatarId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAvatarIdLessThanOrEqualTo(Integer value) {
+ addCriterion("avatar_id <=", value, "avatarId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAvatarIdIn(List values) {
+ addCriterion("avatar_id in", values, "avatarId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAvatarIdNotIn(List values) {
+ addCriterion("avatar_id not in", values, "avatarId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAvatarIdBetween(Integer value1, Integer value2) {
+ addCriterion("avatar_id between", value1, value2, "avatarId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAvatarIdNotBetween(Integer value1, Integer value2) {
+ addCriterion("avatar_id not between", value1, value2, "avatarId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUrlIsNull() {
+ addCriterion("url is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUrlIsNotNull() {
+ addCriterion("url is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUrlEqualTo(String value) {
+ addCriterion("url =", value, "url");
+ return (Criteria) this;
+ }
+
+ public Criteria andUrlNotEqualTo(String value) {
+ addCriterion("url <>", value, "url");
+ return (Criteria) this;
+ }
+
+ public Criteria andUrlGreaterThan(String value) {
+ addCriterion("url >", value, "url");
+ return (Criteria) this;
+ }
+
+ public Criteria andUrlGreaterThanOrEqualTo(String value) {
+ addCriterion("url >=", value, "url");
+ return (Criteria) this;
+ }
+
+ public Criteria andUrlLessThan(String value) {
+ addCriterion("url <", value, "url");
+ return (Criteria) this;
+ }
+
+ public Criteria andUrlLessThanOrEqualTo(String value) {
+ addCriterion("url <=", value, "url");
+ return (Criteria) this;
+ }
+
+ public Criteria andUrlLike(String value) {
+ addCriterion("url like", value, "url");
+ return (Criteria) this;
+ }
+
+ public Criteria andUrlNotLike(String value) {
+ addCriterion("url not like", value, "url");
+ return (Criteria) this;
+ }
+
+ public Criteria andUrlIn(List values) {
+ addCriterion("url in", values, "url");
+ return (Criteria) this;
+ }
+
+ public Criteria andUrlNotIn(List values) {
+ addCriterion("url not in", values, "url");
+ return (Criteria) this;
+ }
+
+ public Criteria andUrlBetween(String value1, String value2) {
+ addCriterion("url between", value1, value2, "url");
+ return (Criteria) this;
+ }
+
+ public Criteria andUrlNotBetween(String value1, String value2) {
+ addCriterion("url not between", value1, value2, "url");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdIsNull() {
+ addCriterion("user_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdIsNotNull() {
+ addCriterion("user_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdEqualTo(Integer value) {
+ addCriterion("user_id =", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdNotEqualTo(Integer value) {
+ addCriterion("user_id <>", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdGreaterThan(Integer value) {
+ addCriterion("user_id >", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdGreaterThanOrEqualTo(Integer value) {
+ addCriterion("user_id >=", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdLessThan(Integer value) {
+ addCriterion("user_id <", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdLessThanOrEqualTo(Integer value) {
+ addCriterion("user_id <=", value, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdIn(List values) {
+ addCriterion("user_id in", values, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdNotIn(List values) {
+ addCriterion("user_id not in", values, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdBetween(Integer value1, Integer value2) {
+ addCriterion("user_id between", value1, value2, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andUserIdNotBetween(Integer value1, Integer value2) {
+ addCriterion("user_id not between", value1, value2, "userId");
+ return (Criteria) this;
+ }
+
+ public Criteria andActiveFlagIsNull() {
+ addCriterion("active_flag is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andActiveFlagIsNotNull() {
+ addCriterion("active_flag is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andActiveFlagEqualTo(Boolean value) {
+ addCriterion("active_flag =", value, "activeFlag");
+ return (Criteria) this;
+ }
+
+ public Criteria andActiveFlagNotEqualTo(Boolean value) {
+ addCriterion("active_flag <>", value, "activeFlag");
+ return (Criteria) this;
+ }
+
+ public Criteria andActiveFlagGreaterThan(Boolean value) {
+ addCriterion("active_flag >", value, "activeFlag");
+ return (Criteria) this;
+ }
+
+ public Criteria andActiveFlagGreaterThanOrEqualTo(Boolean value) {
+ addCriterion("active_flag >=", value, "activeFlag");
+ return (Criteria) this;
+ }
+
+ public Criteria andActiveFlagLessThan(Boolean value) {
+ addCriterion("active_flag <", value, "activeFlag");
+ return (Criteria) this;
+ }
+
+ public Criteria andActiveFlagLessThanOrEqualTo(Boolean value) {
+ addCriterion("active_flag <=", value, "activeFlag");
+ return (Criteria) this;
+ }
+
+ public Criteria andActiveFlagIn(List values) {
+ addCriterion("active_flag in", values, "activeFlag");
+ return (Criteria) this;
+ }
+
+ public Criteria andActiveFlagNotIn(List values) {
+ addCriterion("active_flag not in", values, "activeFlag");
+ return (Criteria) this;
+ }
+
+ public Criteria andActiveFlagBetween(Boolean value1, Boolean value2) {
+ addCriterion("active_flag between", value1, value2, "activeFlag");
+ return (Criteria) this;
+ }
+
+ public Criteria andActiveFlagNotBetween(Boolean value1, Boolean value2) {
+ addCriterion("active_flag not between", value1, value2, "activeFlag");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsIsNull() {
+ addCriterion("created_ts is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsIsNotNull() {
+ addCriterion("created_ts is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsEqualTo(LocalDateTime value) {
+ addCriterion("created_ts =", value, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsNotEqualTo(LocalDateTime value) {
+ addCriterion("created_ts <>", value, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsGreaterThan(LocalDateTime value) {
+ addCriterion("created_ts >", value, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsGreaterThanOrEqualTo(LocalDateTime value) {
+ addCriterion("created_ts >=", value, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsLessThan(LocalDateTime value) {
+ addCriterion("created_ts <", value, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsLessThanOrEqualTo(LocalDateTime value) {
+ addCriterion("created_ts <=", value, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsIn(List values) {
+ addCriterion("created_ts in", values, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsNotIn(List values) {
+ addCriterion("created_ts not in", values, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsBetween(LocalDateTime value1, LocalDateTime value2) {
+ addCriterion("created_ts between", value1, value2, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsNotBetween(LocalDateTime value1, LocalDateTime value2) {
+ addCriterion("created_ts not between", value1, value2, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsIsNull() {
+ addCriterion("updated_ts is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsIsNotNull() {
+ addCriterion("updated_ts is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsEqualTo(LocalDateTime value) {
+ addCriterion("updated_ts =", value, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsNotEqualTo(LocalDateTime value) {
+ addCriterion("updated_ts <>", value, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsGreaterThan(LocalDateTime value) {
+ addCriterion("updated_ts >", value, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsGreaterThanOrEqualTo(LocalDateTime value) {
+ addCriterion("updated_ts >=", value, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsLessThan(LocalDateTime value) {
+ addCriterion("updated_ts <", value, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsLessThanOrEqualTo(LocalDateTime value) {
+ addCriterion("updated_ts <=", value, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsIn(List values) {
+ addCriterion("updated_ts in", values, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsNotIn(List values) {
+ addCriterion("updated_ts not in", values, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsBetween(LocalDateTime value1, LocalDateTime value2) {
+ addCriterion("updated_ts between", value1, value2, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsNotBetween(LocalDateTime value1, LocalDateTime value2) {
+ addCriterion("updated_ts not between", value1, value2, "updatedTs");
+ return (Criteria) this;
+ }
+ }
+
+ /**
+ * This class was generated by MyBatis Generator. This class corresponds to the database table zfgbb.avatar
+ * @mbg.generated Sun Sep 29 14:51:19 EDT 2024
+ */
+ public static class Criterion {
+ private String condition;
+ private Object value;
+ private Object secondValue;
+ private boolean noValue;
+ private boolean singleValue;
+ private boolean betweenValue;
+ private boolean listValue;
+ private String typeHandler;
+
+ public String getCondition() {
+ return condition;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object getSecondValue() {
+ return secondValue;
+ }
+
+ public boolean isNoValue() {
+ return noValue;
+ }
+
+ public boolean isSingleValue() {
+ return singleValue;
+ }
+
+ public boolean isBetweenValue() {
+ return betweenValue;
+ }
+
+ public boolean isListValue() {
+ return listValue;
+ }
+
+ public String getTypeHandler() {
+ return typeHandler;
+ }
+
+ protected Criterion(String condition) {
+ super();
+ this.condition = condition;
+ this.typeHandler = null;
+ this.noValue = true;
+ }
+
+ protected Criterion(String condition, Object value, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.typeHandler = typeHandler;
+ if (value instanceof List>) {
+ this.listValue = true;
+ } else {
+ this.singleValue = true;
+ }
+ }
+
+ protected Criterion(String condition, Object value) {
+ this(condition, value, null);
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.secondValue = secondValue;
+ this.typeHandler = typeHandler;
+ this.betweenValue = true;
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue) {
+ this(condition, value, secondValue, null);
+ }
+ }
+
+ /**
+ * This class was generated by MyBatis Generator.
+ * This class corresponds to the database table zfgbb.avatar
+ *
+ * @mbg.generated do_not_delete_during_merge Sun Sep 29 14:50:53 EDT 2024
+ */
+ public static class Criteria extends GeneratedCriteria {
+ protected Criteria() {
+ super();
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dbo/BBCodeAttributeDbo.java b/src/main/java/com/zfgc/zfgbb/dbo/BBCodeAttributeDbo.java
index 88aaa6c..b091615 100644
--- a/src/main/java/com/zfgc/zfgbb/dbo/BBCodeAttributeDbo.java
+++ b/src/main/java/com/zfgc/zfgbb/dbo/BBCodeAttributeDbo.java
@@ -1,185 +1,185 @@
-package com.zfgc.zfgbb.dbo;
-
-import java.time.LocalDate;
-
-import com.zfgc.zfgbb.dbo.AbstractDbo;
-import java.time.LocalDateTime;
-
-public class BBCodeAttributeDbo extends AbstractDbo{
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute.bb_code_attribute_id
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- private Integer bbCodeAttributeId;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute.attribute_data_type
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- private Integer attributeDataType;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute.attribute_index
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- private Integer attributeIndex;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute.bb_code_attribute_mode_id
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- private Integer bbCodeAttributeModeId;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute.name
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- private String name;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute.created_ts
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- private LocalDateTime createdTs;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute.updated_ts
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- private LocalDateTime updatedTs;
-
- /**
- * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute.bb_code_attribute_id
- * @return the value of zfgbb.bb_code_attribute.bb_code_attribute_id
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public Integer getBbCodeAttributeId() {
- return bbCodeAttributeId;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute.bb_code_attribute_id
- * @param bbCodeAttributeId the value for zfgbb.bb_code_attribute.bb_code_attribute_id
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setBbCodeAttributeId(Integer bbCodeAttributeId) {
- this.bbCodeAttributeId = bbCodeAttributeId;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute.attribute_data_type
- * @return the value of zfgbb.bb_code_attribute.attribute_data_type
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public Integer getAttributeDataType() {
- return attributeDataType;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute.attribute_data_type
- * @param attributeDataType the value for zfgbb.bb_code_attribute.attribute_data_type
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setAttributeDataType(Integer attributeDataType) {
- this.attributeDataType = attributeDataType;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute.attribute_index
- * @return the value of zfgbb.bb_code_attribute.attribute_index
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public Integer getAttributeIndex() {
- return attributeIndex;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute.attribute_index
- * @param attributeIndex the value for zfgbb.bb_code_attribute.attribute_index
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setAttributeIndex(Integer attributeIndex) {
- this.attributeIndex = attributeIndex;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute.bb_code_attribute_mode_id
- * @return the value of zfgbb.bb_code_attribute.bb_code_attribute_mode_id
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public Integer getBbCodeAttributeModeId() {
- return bbCodeAttributeModeId;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute.bb_code_attribute_mode_id
- * @param bbCodeAttributeModeId the value for zfgbb.bb_code_attribute.bb_code_attribute_mode_id
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setBbCodeAttributeModeId(Integer bbCodeAttributeModeId) {
- this.bbCodeAttributeModeId = bbCodeAttributeModeId;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute.name
- * @return the value of zfgbb.bb_code_attribute.name
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public String getName() {
- return name;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute.name
- * @param name the value for zfgbb.bb_code_attribute.name
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setName(String name) {
- this.name = name;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute.created_ts
- * @return the value of zfgbb.bb_code_attribute.created_ts
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public LocalDateTime getCreatedTs() {
- return createdTs;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute.created_ts
- * @param createdTs the value for zfgbb.bb_code_attribute.created_ts
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setCreatedTs(LocalDateTime createdTs) {
- this.createdTs = createdTs;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute.updated_ts
- * @return the value of zfgbb.bb_code_attribute.updated_ts
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public LocalDateTime getUpdatedTs() {
- return updatedTs;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute.updated_ts
- * @param updatedTs the value for zfgbb.bb_code_attribute.updated_ts
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setUpdatedTs(LocalDateTime updatedTs) {
- this.updatedTs = updatedTs;
- }
-
- @Override
- public Integer getPkId() {
- return bbCodeAttributeId;
- }
-
- @Override
- public LocalDateTime getUpdatedTime() {
- return updatedTs;
- }
-
- @Override
- public LocalDateTime getCreatedTime() {
- return createdTs;
- }
+package com.zfgc.zfgbb.dbo;
+
+import java.time.LocalDate;
+
+import com.zfgc.zfgbb.dbo.AbstractDbo;
+import java.time.LocalDateTime;
+
+public class BBCodeAttributeDbo extends AbstractDbo{
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute.bb_code_attribute_id
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ private Integer bbCodeAttributeId;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute.attribute_data_type
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ private Integer attributeDataType;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute.attribute_index
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ private Integer attributeIndex;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute.bb_code_attribute_mode_id
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ private Integer bbCodeAttributeModeId;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute.name
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ private String name;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute.created_ts
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ private LocalDateTime createdTs;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute.updated_ts
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ private LocalDateTime updatedTs;
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute.bb_code_attribute_id
+ * @return the value of zfgbb.bb_code_attribute.bb_code_attribute_id
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public Integer getBbCodeAttributeId() {
+ return bbCodeAttributeId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute.bb_code_attribute_id
+ * @param bbCodeAttributeId the value for zfgbb.bb_code_attribute.bb_code_attribute_id
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setBbCodeAttributeId(Integer bbCodeAttributeId) {
+ this.bbCodeAttributeId = bbCodeAttributeId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute.attribute_data_type
+ * @return the value of zfgbb.bb_code_attribute.attribute_data_type
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public Integer getAttributeDataType() {
+ return attributeDataType;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute.attribute_data_type
+ * @param attributeDataType the value for zfgbb.bb_code_attribute.attribute_data_type
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setAttributeDataType(Integer attributeDataType) {
+ this.attributeDataType = attributeDataType;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute.attribute_index
+ * @return the value of zfgbb.bb_code_attribute.attribute_index
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public Integer getAttributeIndex() {
+ return attributeIndex;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute.attribute_index
+ * @param attributeIndex the value for zfgbb.bb_code_attribute.attribute_index
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setAttributeIndex(Integer attributeIndex) {
+ this.attributeIndex = attributeIndex;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute.bb_code_attribute_mode_id
+ * @return the value of zfgbb.bb_code_attribute.bb_code_attribute_mode_id
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public Integer getBbCodeAttributeModeId() {
+ return bbCodeAttributeModeId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute.bb_code_attribute_mode_id
+ * @param bbCodeAttributeModeId the value for zfgbb.bb_code_attribute.bb_code_attribute_mode_id
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setBbCodeAttributeModeId(Integer bbCodeAttributeModeId) {
+ this.bbCodeAttributeModeId = bbCodeAttributeModeId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute.name
+ * @return the value of zfgbb.bb_code_attribute.name
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute.name
+ * @param name the value for zfgbb.bb_code_attribute.name
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute.created_ts
+ * @return the value of zfgbb.bb_code_attribute.created_ts
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public LocalDateTime getCreatedTs() {
+ return createdTs;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute.created_ts
+ * @param createdTs the value for zfgbb.bb_code_attribute.created_ts
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setCreatedTs(LocalDateTime createdTs) {
+ this.createdTs = createdTs;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute.updated_ts
+ * @return the value of zfgbb.bb_code_attribute.updated_ts
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public LocalDateTime getUpdatedTs() {
+ return updatedTs;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute.updated_ts
+ * @param updatedTs the value for zfgbb.bb_code_attribute.updated_ts
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setUpdatedTs(LocalDateTime updatedTs) {
+ this.updatedTs = updatedTs;
+ }
+
+ @Override
+ public Integer getPkId() {
+ return bbCodeAttributeId;
+ }
+
+ @Override
+ public LocalDateTime getUpdatedTime() {
+ return updatedTs;
+ }
+
+ @Override
+ public LocalDateTime getCreatedTime() {
+ return createdTs;
+ }
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dbo/BBCodeAttributeDboExample.java b/src/main/java/com/zfgc/zfgbb/dbo/BBCodeAttributeDboExample.java
index 1404479..f7a4fcc 100644
--- a/src/main/java/com/zfgc/zfgbb/dbo/BBCodeAttributeDboExample.java
+++ b/src/main/java/com/zfgc/zfgbb/dbo/BBCodeAttributeDboExample.java
@@ -1,692 +1,692 @@
-package com.zfgc.zfgbb.dbo;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-
-public class BBCodeAttributeDboExample {
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database table zfgbb.bb_code_attribute
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- protected String orderByClause;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database table zfgbb.bb_code_attribute
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- protected boolean distinct;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database table zfgbb.bb_code_attribute
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- protected List oredCriteria;
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public BBCodeAttributeDboExample() {
- oredCriteria = new ArrayList<>();
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setOrderByClause(String orderByClause) {
- this.orderByClause = orderByClause;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public String getOrderByClause() {
- return orderByClause;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setDistinct(boolean distinct) {
- this.distinct = distinct;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public boolean isDistinct() {
- return distinct;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public List getOredCriteria() {
- return oredCriteria;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void or(Criteria criteria) {
- oredCriteria.add(criteria);
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public Criteria or() {
- Criteria criteria = createCriteriaInternal();
- oredCriteria.add(criteria);
- return criteria;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public Criteria createCriteria() {
- Criteria criteria = createCriteriaInternal();
- if (oredCriteria.size() == 0) {
- oredCriteria.add(criteria);
- }
- return criteria;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- protected Criteria createCriteriaInternal() {
- Criteria criteria = new Criteria();
- return criteria;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void clear() {
- oredCriteria.clear();
- orderByClause = null;
- distinct = false;
- }
-
- /**
- * This class was generated by MyBatis Generator. This class corresponds to the database table zfgbb.bb_code_attribute
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- protected abstract static class GeneratedCriteria {
- protected List criteria;
-
- protected GeneratedCriteria() {
- super();
- criteria = new ArrayList<>();
- }
-
- public boolean isValid() {
- return criteria.size() > 0;
- }
-
- public List getAllCriteria() {
- return criteria;
- }
-
- public List getCriteria() {
- return criteria;
- }
-
- protected void addCriterion(String condition) {
- if (condition == null) {
- throw new RuntimeException("Value for condition cannot be null");
- }
- criteria.add(new Criterion(condition));
- }
-
- protected void addCriterion(String condition, Object value, String property) {
- if (value == null) {
- throw new RuntimeException("Value for " + property + " cannot be null");
- }
- criteria.add(new Criterion(condition, value));
- }
-
- protected void addCriterion(String condition, Object value1, Object value2, String property) {
- if (value1 == null || value2 == null) {
- throw new RuntimeException("Between values for " + property + " cannot be null");
- }
- criteria.add(new Criterion(condition, value1, value2));
- }
-
- public Criteria andBbCodeAttributeIdIsNull() {
- addCriterion("bb_code_attribute_id is null");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeIdIsNotNull() {
- addCriterion("bb_code_attribute_id is not null");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeIdEqualTo(Integer value) {
- addCriterion("bb_code_attribute_id =", value, "bbCodeAttributeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeIdNotEqualTo(Integer value) {
- addCriterion("bb_code_attribute_id <>", value, "bbCodeAttributeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeIdGreaterThan(Integer value) {
- addCriterion("bb_code_attribute_id >", value, "bbCodeAttributeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeIdGreaterThanOrEqualTo(Integer value) {
- addCriterion("bb_code_attribute_id >=", value, "bbCodeAttributeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeIdLessThan(Integer value) {
- addCriterion("bb_code_attribute_id <", value, "bbCodeAttributeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeIdLessThanOrEqualTo(Integer value) {
- addCriterion("bb_code_attribute_id <=", value, "bbCodeAttributeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeIdIn(List values) {
- addCriterion("bb_code_attribute_id in", values, "bbCodeAttributeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeIdNotIn(List values) {
- addCriterion("bb_code_attribute_id not in", values, "bbCodeAttributeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeIdBetween(Integer value1, Integer value2) {
- addCriterion("bb_code_attribute_id between", value1, value2, "bbCodeAttributeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeIdNotBetween(Integer value1, Integer value2) {
- addCriterion("bb_code_attribute_id not between", value1, value2, "bbCodeAttributeId");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeIsNull() {
- addCriterion("attribute_data_type is null");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeIsNotNull() {
- addCriterion("attribute_data_type is not null");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeEqualTo(Integer value) {
- addCriterion("attribute_data_type =", value, "attributeDataType");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeNotEqualTo(Integer value) {
- addCriterion("attribute_data_type <>", value, "attributeDataType");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeGreaterThan(Integer value) {
- addCriterion("attribute_data_type >", value, "attributeDataType");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeGreaterThanOrEqualTo(Integer value) {
- addCriterion("attribute_data_type >=", value, "attributeDataType");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeLessThan(Integer value) {
- addCriterion("attribute_data_type <", value, "attributeDataType");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeLessThanOrEqualTo(Integer value) {
- addCriterion("attribute_data_type <=", value, "attributeDataType");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeIn(List values) {
- addCriterion("attribute_data_type in", values, "attributeDataType");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeNotIn(List values) {
- addCriterion("attribute_data_type not in", values, "attributeDataType");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeBetween(Integer value1, Integer value2) {
- addCriterion("attribute_data_type between", value1, value2, "attributeDataType");
- return (Criteria) this;
- }
-
- public Criteria andAttributeDataTypeNotBetween(Integer value1, Integer value2) {
- addCriterion("attribute_data_type not between", value1, value2, "attributeDataType");
- return (Criteria) this;
- }
-
- public Criteria andAttributeIndexIsNull() {
- addCriterion("attribute_index is null");
- return (Criteria) this;
- }
-
- public Criteria andAttributeIndexIsNotNull() {
- addCriterion("attribute_index is not null");
- return (Criteria) this;
- }
-
- public Criteria andAttributeIndexEqualTo(Integer value) {
- addCriterion("attribute_index =", value, "attributeIndex");
- return (Criteria) this;
- }
-
- public Criteria andAttributeIndexNotEqualTo(Integer value) {
- addCriterion("attribute_index <>", value, "attributeIndex");
- return (Criteria) this;
- }
-
- public Criteria andAttributeIndexGreaterThan(Integer value) {
- addCriterion("attribute_index >", value, "attributeIndex");
- return (Criteria) this;
- }
-
- public Criteria andAttributeIndexGreaterThanOrEqualTo(Integer value) {
- addCriterion("attribute_index >=", value, "attributeIndex");
- return (Criteria) this;
- }
-
- public Criteria andAttributeIndexLessThan(Integer value) {
- addCriterion("attribute_index <", value, "attributeIndex");
- return (Criteria) this;
- }
-
- public Criteria andAttributeIndexLessThanOrEqualTo(Integer value) {
- addCriterion("attribute_index <=", value, "attributeIndex");
- return (Criteria) this;
- }
-
- public Criteria andAttributeIndexIn(List values) {
- addCriterion("attribute_index in", values, "attributeIndex");
- return (Criteria) this;
- }
-
- public Criteria andAttributeIndexNotIn(List values) {
- addCriterion("attribute_index not in", values, "attributeIndex");
- return (Criteria) this;
- }
-
- public Criteria andAttributeIndexBetween(Integer value1, Integer value2) {
- addCriterion("attribute_index between", value1, value2, "attributeIndex");
- return (Criteria) this;
- }
-
- public Criteria andAttributeIndexNotBetween(Integer value1, Integer value2) {
- addCriterion("attribute_index not between", value1, value2, "attributeIndex");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdIsNull() {
- addCriterion("bb_code_attribute_mode_id is null");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdIsNotNull() {
- addCriterion("bb_code_attribute_mode_id is not null");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdEqualTo(Integer value) {
- addCriterion("bb_code_attribute_mode_id =", value, "bbCodeAttributeModeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdNotEqualTo(Integer value) {
- addCriterion("bb_code_attribute_mode_id <>", value, "bbCodeAttributeModeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdGreaterThan(Integer value) {
- addCriterion("bb_code_attribute_mode_id >", value, "bbCodeAttributeModeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdGreaterThanOrEqualTo(Integer value) {
- addCriterion("bb_code_attribute_mode_id >=", value, "bbCodeAttributeModeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdLessThan(Integer value) {
- addCriterion("bb_code_attribute_mode_id <", value, "bbCodeAttributeModeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdLessThanOrEqualTo(Integer value) {
- addCriterion("bb_code_attribute_mode_id <=", value, "bbCodeAttributeModeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdIn(List values) {
- addCriterion("bb_code_attribute_mode_id in", values, "bbCodeAttributeModeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdNotIn(List values) {
- addCriterion("bb_code_attribute_mode_id not in", values, "bbCodeAttributeModeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdBetween(Integer value1, Integer value2) {
- addCriterion("bb_code_attribute_mode_id between", value1, value2, "bbCodeAttributeModeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdNotBetween(Integer value1, Integer value2) {
- addCriterion("bb_code_attribute_mode_id not between", value1, value2, "bbCodeAttributeModeId");
- return (Criteria) this;
- }
-
- public Criteria andNameIsNull() {
- addCriterion("name is null");
- return (Criteria) this;
- }
-
- public Criteria andNameIsNotNull() {
- addCriterion("name is not null");
- return (Criteria) this;
- }
-
- public Criteria andNameEqualTo(String value) {
- addCriterion("name =", value, "name");
- return (Criteria) this;
- }
-
- public Criteria andNameNotEqualTo(String value) {
- addCriterion("name <>", value, "name");
- return (Criteria) this;
- }
-
- public Criteria andNameGreaterThan(String value) {
- addCriterion("name >", value, "name");
- return (Criteria) this;
- }
-
- public Criteria andNameGreaterThanOrEqualTo(String value) {
- addCriterion("name >=", value, "name");
- return (Criteria) this;
- }
-
- public Criteria andNameLessThan(String value) {
- addCriterion("name <", value, "name");
- return (Criteria) this;
- }
-
- public Criteria andNameLessThanOrEqualTo(String value) {
- addCriterion("name <=", value, "name");
- return (Criteria) this;
- }
-
- public Criteria andNameLike(String value) {
- addCriterion("name like", value, "name");
- return (Criteria) this;
- }
-
- public Criteria andNameNotLike(String value) {
- addCriterion("name not like", value, "name");
- return (Criteria) this;
- }
-
- public Criteria andNameIn(List values) {
- addCriterion("name in", values, "name");
- return (Criteria) this;
- }
-
- public Criteria andNameNotIn(List values) {
- addCriterion("name not in", values, "name");
- return (Criteria) this;
- }
-
- public Criteria andNameBetween(String value1, String value2) {
- addCriterion("name between", value1, value2, "name");
- return (Criteria) this;
- }
-
- public Criteria andNameNotBetween(String value1, String value2) {
- addCriterion("name not between", value1, value2, "name");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsIsNull() {
- addCriterion("created_ts is null");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsIsNotNull() {
- addCriterion("created_ts is not null");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsEqualTo(LocalDateTime value) {
- addCriterion("created_ts =", value, "createdTs");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsNotEqualTo(LocalDateTime value) {
- addCriterion("created_ts <>", value, "createdTs");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsGreaterThan(LocalDateTime value) {
- addCriterion("created_ts >", value, "createdTs");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsGreaterThanOrEqualTo(LocalDateTime value) {
- addCriterion("created_ts >=", value, "createdTs");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsLessThan(LocalDateTime value) {
- addCriterion("created_ts <", value, "createdTs");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsLessThanOrEqualTo(LocalDateTime value) {
- addCriterion("created_ts <=", value, "createdTs");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsIn(List values) {
- addCriterion("created_ts in", values, "createdTs");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsNotIn(List values) {
- addCriterion("created_ts not in", values, "createdTs");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsBetween(LocalDateTime value1, LocalDateTime value2) {
- addCriterion("created_ts between", value1, value2, "createdTs");
- return (Criteria) this;
- }
-
- public Criteria andCreatedTsNotBetween(LocalDateTime value1, LocalDateTime value2) {
- addCriterion("created_ts not between", value1, value2, "createdTs");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsIsNull() {
- addCriterion("updated_ts is null");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsIsNotNull() {
- addCriterion("updated_ts is not null");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsEqualTo(LocalDateTime value) {
- addCriterion("updated_ts =", value, "updatedTs");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsNotEqualTo(LocalDateTime value) {
- addCriterion("updated_ts <>", value, "updatedTs");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsGreaterThan(LocalDateTime value) {
- addCriterion("updated_ts >", value, "updatedTs");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsGreaterThanOrEqualTo(LocalDateTime value) {
- addCriterion("updated_ts >=", value, "updatedTs");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsLessThan(LocalDateTime value) {
- addCriterion("updated_ts <", value, "updatedTs");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsLessThanOrEqualTo(LocalDateTime value) {
- addCriterion("updated_ts <=", value, "updatedTs");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsIn(List values) {
- addCriterion("updated_ts in", values, "updatedTs");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsNotIn(List values) {
- addCriterion("updated_ts not in", values, "updatedTs");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsBetween(LocalDateTime value1, LocalDateTime value2) {
- addCriterion("updated_ts between", value1, value2, "updatedTs");
- return (Criteria) this;
- }
-
- public Criteria andUpdatedTsNotBetween(LocalDateTime value1, LocalDateTime value2) {
- addCriterion("updated_ts not between", value1, value2, "updatedTs");
- return (Criteria) this;
- }
- }
-
- /**
- * This class was generated by MyBatis Generator. This class corresponds to the database table zfgbb.bb_code_attribute
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public static class Criterion {
- private String condition;
- private Object value;
- private Object secondValue;
- private boolean noValue;
- private boolean singleValue;
- private boolean betweenValue;
- private boolean listValue;
- private String typeHandler;
-
- public String getCondition() {
- return condition;
- }
-
- public Object getValue() {
- return value;
- }
-
- public Object getSecondValue() {
- return secondValue;
- }
-
- public boolean isNoValue() {
- return noValue;
- }
-
- public boolean isSingleValue() {
- return singleValue;
- }
-
- public boolean isBetweenValue() {
- return betweenValue;
- }
-
- public boolean isListValue() {
- return listValue;
- }
-
- public String getTypeHandler() {
- return typeHandler;
- }
-
- protected Criterion(String condition) {
- super();
- this.condition = condition;
- this.typeHandler = null;
- this.noValue = true;
- }
-
- protected Criterion(String condition, Object value, String typeHandler) {
- super();
- this.condition = condition;
- this.value = value;
- this.typeHandler = typeHandler;
- if (value instanceof List>) {
- this.listValue = true;
- } else {
- this.singleValue = true;
- }
- }
-
- protected Criterion(String condition, Object value) {
- this(condition, value, null);
- }
-
- protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
- super();
- this.condition = condition;
- this.value = value;
- this.secondValue = secondValue;
- this.typeHandler = typeHandler;
- this.betweenValue = true;
- }
-
- protected Criterion(String condition, Object value, Object secondValue) {
- this(condition, value, secondValue, null);
- }
- }
-
- /**
- * This class was generated by MyBatis Generator.
- * This class corresponds to the database table zfgbb.bb_code_attribute
- *
- * @mbg.generated do_not_delete_during_merge Fri Feb 25 00:15:45 EST 2022
- */
- public static class Criteria extends GeneratedCriteria {
- protected Criteria() {
- super();
- }
- }
+package com.zfgc.zfgbb.dbo;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+public class BBCodeAttributeDboExample {
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database table zfgbb.bb_code_attribute
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ protected String orderByClause;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database table zfgbb.bb_code_attribute
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ protected boolean distinct;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database table zfgbb.bb_code_attribute
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ protected List oredCriteria;
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public BBCodeAttributeDboExample() {
+ oredCriteria = new ArrayList<>();
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setOrderByClause(String orderByClause) {
+ this.orderByClause = orderByClause;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public String getOrderByClause() {
+ return orderByClause;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setDistinct(boolean distinct) {
+ this.distinct = distinct;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public boolean isDistinct() {
+ return distinct;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public List getOredCriteria() {
+ return oredCriteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void or(Criteria criteria) {
+ oredCriteria.add(criteria);
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public Criteria or() {
+ Criteria criteria = createCriteriaInternal();
+ oredCriteria.add(criteria);
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public Criteria createCriteria() {
+ Criteria criteria = createCriteriaInternal();
+ if (oredCriteria.size() == 0) {
+ oredCriteria.add(criteria);
+ }
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ protected Criteria createCriteriaInternal() {
+ Criteria criteria = new Criteria();
+ return criteria;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void clear() {
+ oredCriteria.clear();
+ orderByClause = null;
+ distinct = false;
+ }
+
+ /**
+ * This class was generated by MyBatis Generator. This class corresponds to the database table zfgbb.bb_code_attribute
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ protected abstract static class GeneratedCriteria {
+ protected List criteria;
+
+ protected GeneratedCriteria() {
+ super();
+ criteria = new ArrayList<>();
+ }
+
+ public boolean isValid() {
+ return criteria.size() > 0;
+ }
+
+ public List getAllCriteria() {
+ return criteria;
+ }
+
+ public List getCriteria() {
+ return criteria;
+ }
+
+ protected void addCriterion(String condition) {
+ if (condition == null) {
+ throw new RuntimeException("Value for condition cannot be null");
+ }
+ criteria.add(new Criterion(condition));
+ }
+
+ protected void addCriterion(String condition, Object value, String property) {
+ if (value == null) {
+ throw new RuntimeException("Value for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value));
+ }
+
+ protected void addCriterion(String condition, Object value1, Object value2, String property) {
+ if (value1 == null || value2 == null) {
+ throw new RuntimeException("Between values for " + property + " cannot be null");
+ }
+ criteria.add(new Criterion(condition, value1, value2));
+ }
+
+ public Criteria andBbCodeAttributeIdIsNull() {
+ addCriterion("bb_code_attribute_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeIdIsNotNull() {
+ addCriterion("bb_code_attribute_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeIdEqualTo(Integer value) {
+ addCriterion("bb_code_attribute_id =", value, "bbCodeAttributeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeIdNotEqualTo(Integer value) {
+ addCriterion("bb_code_attribute_id <>", value, "bbCodeAttributeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeIdGreaterThan(Integer value) {
+ addCriterion("bb_code_attribute_id >", value, "bbCodeAttributeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeIdGreaterThanOrEqualTo(Integer value) {
+ addCriterion("bb_code_attribute_id >=", value, "bbCodeAttributeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeIdLessThan(Integer value) {
+ addCriterion("bb_code_attribute_id <", value, "bbCodeAttributeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeIdLessThanOrEqualTo(Integer value) {
+ addCriterion("bb_code_attribute_id <=", value, "bbCodeAttributeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeIdIn(List values) {
+ addCriterion("bb_code_attribute_id in", values, "bbCodeAttributeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeIdNotIn(List values) {
+ addCriterion("bb_code_attribute_id not in", values, "bbCodeAttributeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeIdBetween(Integer value1, Integer value2) {
+ addCriterion("bb_code_attribute_id between", value1, value2, "bbCodeAttributeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeIdNotBetween(Integer value1, Integer value2) {
+ addCriterion("bb_code_attribute_id not between", value1, value2, "bbCodeAttributeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeIsNull() {
+ addCriterion("attribute_data_type is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeIsNotNull() {
+ addCriterion("attribute_data_type is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeEqualTo(Integer value) {
+ addCriterion("attribute_data_type =", value, "attributeDataType");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeNotEqualTo(Integer value) {
+ addCriterion("attribute_data_type <>", value, "attributeDataType");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeGreaterThan(Integer value) {
+ addCriterion("attribute_data_type >", value, "attributeDataType");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeGreaterThanOrEqualTo(Integer value) {
+ addCriterion("attribute_data_type >=", value, "attributeDataType");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeLessThan(Integer value) {
+ addCriterion("attribute_data_type <", value, "attributeDataType");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeLessThanOrEqualTo(Integer value) {
+ addCriterion("attribute_data_type <=", value, "attributeDataType");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeIn(List values) {
+ addCriterion("attribute_data_type in", values, "attributeDataType");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeNotIn(List values) {
+ addCriterion("attribute_data_type not in", values, "attributeDataType");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeBetween(Integer value1, Integer value2) {
+ addCriterion("attribute_data_type between", value1, value2, "attributeDataType");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeDataTypeNotBetween(Integer value1, Integer value2) {
+ addCriterion("attribute_data_type not between", value1, value2, "attributeDataType");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeIndexIsNull() {
+ addCriterion("attribute_index is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeIndexIsNotNull() {
+ addCriterion("attribute_index is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeIndexEqualTo(Integer value) {
+ addCriterion("attribute_index =", value, "attributeIndex");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeIndexNotEqualTo(Integer value) {
+ addCriterion("attribute_index <>", value, "attributeIndex");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeIndexGreaterThan(Integer value) {
+ addCriterion("attribute_index >", value, "attributeIndex");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeIndexGreaterThanOrEqualTo(Integer value) {
+ addCriterion("attribute_index >=", value, "attributeIndex");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeIndexLessThan(Integer value) {
+ addCriterion("attribute_index <", value, "attributeIndex");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeIndexLessThanOrEqualTo(Integer value) {
+ addCriterion("attribute_index <=", value, "attributeIndex");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeIndexIn(List values) {
+ addCriterion("attribute_index in", values, "attributeIndex");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeIndexNotIn(List values) {
+ addCriterion("attribute_index not in", values, "attributeIndex");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeIndexBetween(Integer value1, Integer value2) {
+ addCriterion("attribute_index between", value1, value2, "attributeIndex");
+ return (Criteria) this;
+ }
+
+ public Criteria andAttributeIndexNotBetween(Integer value1, Integer value2) {
+ addCriterion("attribute_index not between", value1, value2, "attributeIndex");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeModeIdIsNull() {
+ addCriterion("bb_code_attribute_mode_id is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeModeIdIsNotNull() {
+ addCriterion("bb_code_attribute_mode_id is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeModeIdEqualTo(Integer value) {
+ addCriterion("bb_code_attribute_mode_id =", value, "bbCodeAttributeModeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeModeIdNotEqualTo(Integer value) {
+ addCriterion("bb_code_attribute_mode_id <>", value, "bbCodeAttributeModeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeModeIdGreaterThan(Integer value) {
+ addCriterion("bb_code_attribute_mode_id >", value, "bbCodeAttributeModeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeModeIdGreaterThanOrEqualTo(Integer value) {
+ addCriterion("bb_code_attribute_mode_id >=", value, "bbCodeAttributeModeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeModeIdLessThan(Integer value) {
+ addCriterion("bb_code_attribute_mode_id <", value, "bbCodeAttributeModeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeModeIdLessThanOrEqualTo(Integer value) {
+ addCriterion("bb_code_attribute_mode_id <=", value, "bbCodeAttributeModeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeModeIdIn(List values) {
+ addCriterion("bb_code_attribute_mode_id in", values, "bbCodeAttributeModeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeModeIdNotIn(List values) {
+ addCriterion("bb_code_attribute_mode_id not in", values, "bbCodeAttributeModeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeModeIdBetween(Integer value1, Integer value2) {
+ addCriterion("bb_code_attribute_mode_id between", value1, value2, "bbCodeAttributeModeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andBbCodeAttributeModeIdNotBetween(Integer value1, Integer value2) {
+ addCriterion("bb_code_attribute_mode_id not between", value1, value2, "bbCodeAttributeModeId");
+ return (Criteria) this;
+ }
+
+ public Criteria andNameIsNull() {
+ addCriterion("name is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andNameIsNotNull() {
+ addCriterion("name is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andNameEqualTo(String value) {
+ addCriterion("name =", value, "name");
+ return (Criteria) this;
+ }
+
+ public Criteria andNameNotEqualTo(String value) {
+ addCriterion("name <>", value, "name");
+ return (Criteria) this;
+ }
+
+ public Criteria andNameGreaterThan(String value) {
+ addCriterion("name >", value, "name");
+ return (Criteria) this;
+ }
+
+ public Criteria andNameGreaterThanOrEqualTo(String value) {
+ addCriterion("name >=", value, "name");
+ return (Criteria) this;
+ }
+
+ public Criteria andNameLessThan(String value) {
+ addCriterion("name <", value, "name");
+ return (Criteria) this;
+ }
+
+ public Criteria andNameLessThanOrEqualTo(String value) {
+ addCriterion("name <=", value, "name");
+ return (Criteria) this;
+ }
+
+ public Criteria andNameLike(String value) {
+ addCriterion("name like", value, "name");
+ return (Criteria) this;
+ }
+
+ public Criteria andNameNotLike(String value) {
+ addCriterion("name not like", value, "name");
+ return (Criteria) this;
+ }
+
+ public Criteria andNameIn(List values) {
+ addCriterion("name in", values, "name");
+ return (Criteria) this;
+ }
+
+ public Criteria andNameNotIn(List values) {
+ addCriterion("name not in", values, "name");
+ return (Criteria) this;
+ }
+
+ public Criteria andNameBetween(String value1, String value2) {
+ addCriterion("name between", value1, value2, "name");
+ return (Criteria) this;
+ }
+
+ public Criteria andNameNotBetween(String value1, String value2) {
+ addCriterion("name not between", value1, value2, "name");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsIsNull() {
+ addCriterion("created_ts is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsIsNotNull() {
+ addCriterion("created_ts is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsEqualTo(LocalDateTime value) {
+ addCriterion("created_ts =", value, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsNotEqualTo(LocalDateTime value) {
+ addCriterion("created_ts <>", value, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsGreaterThan(LocalDateTime value) {
+ addCriterion("created_ts >", value, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsGreaterThanOrEqualTo(LocalDateTime value) {
+ addCriterion("created_ts >=", value, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsLessThan(LocalDateTime value) {
+ addCriterion("created_ts <", value, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsLessThanOrEqualTo(LocalDateTime value) {
+ addCriterion("created_ts <=", value, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsIn(List values) {
+ addCriterion("created_ts in", values, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsNotIn(List values) {
+ addCriterion("created_ts not in", values, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsBetween(LocalDateTime value1, LocalDateTime value2) {
+ addCriterion("created_ts between", value1, value2, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andCreatedTsNotBetween(LocalDateTime value1, LocalDateTime value2) {
+ addCriterion("created_ts not between", value1, value2, "createdTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsIsNull() {
+ addCriterion("updated_ts is null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsIsNotNull() {
+ addCriterion("updated_ts is not null");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsEqualTo(LocalDateTime value) {
+ addCriterion("updated_ts =", value, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsNotEqualTo(LocalDateTime value) {
+ addCriterion("updated_ts <>", value, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsGreaterThan(LocalDateTime value) {
+ addCriterion("updated_ts >", value, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsGreaterThanOrEqualTo(LocalDateTime value) {
+ addCriterion("updated_ts >=", value, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsLessThan(LocalDateTime value) {
+ addCriterion("updated_ts <", value, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsLessThanOrEqualTo(LocalDateTime value) {
+ addCriterion("updated_ts <=", value, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsIn(List values) {
+ addCriterion("updated_ts in", values, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsNotIn(List values) {
+ addCriterion("updated_ts not in", values, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsBetween(LocalDateTime value1, LocalDateTime value2) {
+ addCriterion("updated_ts between", value1, value2, "updatedTs");
+ return (Criteria) this;
+ }
+
+ public Criteria andUpdatedTsNotBetween(LocalDateTime value1, LocalDateTime value2) {
+ addCriterion("updated_ts not between", value1, value2, "updatedTs");
+ return (Criteria) this;
+ }
+ }
+
+ /**
+ * This class was generated by MyBatis Generator. This class corresponds to the database table zfgbb.bb_code_attribute
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public static class Criterion {
+ private String condition;
+ private Object value;
+ private Object secondValue;
+ private boolean noValue;
+ private boolean singleValue;
+ private boolean betweenValue;
+ private boolean listValue;
+ private String typeHandler;
+
+ public String getCondition() {
+ return condition;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object getSecondValue() {
+ return secondValue;
+ }
+
+ public boolean isNoValue() {
+ return noValue;
+ }
+
+ public boolean isSingleValue() {
+ return singleValue;
+ }
+
+ public boolean isBetweenValue() {
+ return betweenValue;
+ }
+
+ public boolean isListValue() {
+ return listValue;
+ }
+
+ public String getTypeHandler() {
+ return typeHandler;
+ }
+
+ protected Criterion(String condition) {
+ super();
+ this.condition = condition;
+ this.typeHandler = null;
+ this.noValue = true;
+ }
+
+ protected Criterion(String condition, Object value, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.typeHandler = typeHandler;
+ if (value instanceof List>) {
+ this.listValue = true;
+ } else {
+ this.singleValue = true;
+ }
+ }
+
+ protected Criterion(String condition, Object value) {
+ this(condition, value, null);
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+ super();
+ this.condition = condition;
+ this.value = value;
+ this.secondValue = secondValue;
+ this.typeHandler = typeHandler;
+ this.betweenValue = true;
+ }
+
+ protected Criterion(String condition, Object value, Object secondValue) {
+ this(condition, value, secondValue, null);
+ }
+ }
+
+ /**
+ * This class was generated by MyBatis Generator.
+ * This class corresponds to the database table zfgbb.bb_code_attribute
+ *
+ * @mbg.generated do_not_delete_during_merge Fri Feb 25 00:15:45 EST 2022
+ */
+ public static class Criteria extends GeneratedCriteria {
+ protected Criteria() {
+ super();
+ }
+ }
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dbo/BBCodeAttributeModeDbo.java b/src/main/java/com/zfgc/zfgbb/dbo/BBCodeAttributeModeDbo.java
index 85ac3b0..cbb39f6 100644
--- a/src/main/java/com/zfgc/zfgbb/dbo/BBCodeAttributeModeDbo.java
+++ b/src/main/java/com/zfgc/zfgbb/dbo/BBCodeAttributeModeDbo.java
@@ -1,208 +1,208 @@
-package com.zfgc.zfgbb.dbo;
-
-import java.time.LocalDate;
-
-import com.zfgc.zfgbb.dbo.AbstractDbo;
-import java.time.LocalDateTime;
-
-public class BBCodeAttributeModeDbo extends AbstractDbo{
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute_mode.bb_code_attribute_mode_id
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- private Integer bbCodeAttributeModeId;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute_mode.bb_code_config_id
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- private Integer bbCodeConfigId;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute_mode.content_is_attribute_flag
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- private Boolean contentIsAttributeFlag;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute_mode.open_tag
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- private String openTag;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute_mode.close_tag
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- private String closeTag;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute_mode.output_content_flag
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- private Boolean outputContentFlag;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute_mode.created_ts
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- private LocalDateTime createdTs;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute_mode.updated_ts
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- private LocalDateTime updatedTs;
-
- /**
- * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute_mode.bb_code_attribute_mode_id
- * @return the value of zfgbb.bb_code_attribute_mode.bb_code_attribute_mode_id
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public Integer getBbCodeAttributeModeId() {
- return bbCodeAttributeModeId;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute_mode.bb_code_attribute_mode_id
- * @param bbCodeAttributeModeId the value for zfgbb.bb_code_attribute_mode.bb_code_attribute_mode_id
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setBbCodeAttributeModeId(Integer bbCodeAttributeModeId) {
- this.bbCodeAttributeModeId = bbCodeAttributeModeId;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute_mode.bb_code_config_id
- * @return the value of zfgbb.bb_code_attribute_mode.bb_code_config_id
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public Integer getBbCodeConfigId() {
- return bbCodeConfigId;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute_mode.bb_code_config_id
- * @param bbCodeConfigId the value for zfgbb.bb_code_attribute_mode.bb_code_config_id
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setBbCodeConfigId(Integer bbCodeConfigId) {
- this.bbCodeConfigId = bbCodeConfigId;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute_mode.content_is_attribute_flag
- * @return the value of zfgbb.bb_code_attribute_mode.content_is_attribute_flag
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public Boolean getContentIsAttributeFlag() {
- return contentIsAttributeFlag;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute_mode.content_is_attribute_flag
- * @param contentIsAttributeFlag the value for zfgbb.bb_code_attribute_mode.content_is_attribute_flag
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setContentIsAttributeFlag(Boolean contentIsAttributeFlag) {
- this.contentIsAttributeFlag = contentIsAttributeFlag;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute_mode.open_tag
- * @return the value of zfgbb.bb_code_attribute_mode.open_tag
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public String getOpenTag() {
- return openTag;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute_mode.open_tag
- * @param openTag the value for zfgbb.bb_code_attribute_mode.open_tag
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setOpenTag(String openTag) {
- this.openTag = openTag;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute_mode.close_tag
- * @return the value of zfgbb.bb_code_attribute_mode.close_tag
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public String getCloseTag() {
- return closeTag;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute_mode.close_tag
- * @param closeTag the value for zfgbb.bb_code_attribute_mode.close_tag
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setCloseTag(String closeTag) {
- this.closeTag = closeTag;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute_mode.output_content_flag
- * @return the value of zfgbb.bb_code_attribute_mode.output_content_flag
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public Boolean getOutputContentFlag() {
- return outputContentFlag;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute_mode.output_content_flag
- * @param outputContentFlag the value for zfgbb.bb_code_attribute_mode.output_content_flag
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setOutputContentFlag(Boolean outputContentFlag) {
- this.outputContentFlag = outputContentFlag;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute_mode.created_ts
- * @return the value of zfgbb.bb_code_attribute_mode.created_ts
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public LocalDateTime getCreatedTs() {
- return createdTs;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute_mode.created_ts
- * @param createdTs the value for zfgbb.bb_code_attribute_mode.created_ts
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setCreatedTs(LocalDateTime createdTs) {
- this.createdTs = createdTs;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute_mode.updated_ts
- * @return the value of zfgbb.bb_code_attribute_mode.updated_ts
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public LocalDateTime getUpdatedTs() {
- return updatedTs;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute_mode.updated_ts
- * @param updatedTs the value for zfgbb.bb_code_attribute_mode.updated_ts
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setUpdatedTs(LocalDateTime updatedTs) {
- this.updatedTs = updatedTs;
- }
-
- @Override
- public Integer getPkId() {
- return bbCodeAttributeModeId;
- }
-
- @Override
- public LocalDateTime getUpdatedTime() {
- return updatedTs;
- }
-
- @Override
- public LocalDateTime getCreatedTime() {
- return createdTs;
- }
+package com.zfgc.zfgbb.dbo;
+
+import java.time.LocalDate;
+
+import com.zfgc.zfgbb.dbo.AbstractDbo;
+import java.time.LocalDateTime;
+
+public class BBCodeAttributeModeDbo extends AbstractDbo{
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute_mode.bb_code_attribute_mode_id
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ private Integer bbCodeAttributeModeId;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute_mode.bb_code_config_id
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ private Integer bbCodeConfigId;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute_mode.content_is_attribute_flag
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ private Boolean contentIsAttributeFlag;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute_mode.open_tag
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ private String openTag;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute_mode.close_tag
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ private String closeTag;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute_mode.output_content_flag
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ private Boolean outputContentFlag;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute_mode.created_ts
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ private LocalDateTime createdTs;
+ /**
+ * This field was generated by MyBatis Generator. This field corresponds to the database column zfgbb.bb_code_attribute_mode.updated_ts
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ private LocalDateTime updatedTs;
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute_mode.bb_code_attribute_mode_id
+ * @return the value of zfgbb.bb_code_attribute_mode.bb_code_attribute_mode_id
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public Integer getBbCodeAttributeModeId() {
+ return bbCodeAttributeModeId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute_mode.bb_code_attribute_mode_id
+ * @param bbCodeAttributeModeId the value for zfgbb.bb_code_attribute_mode.bb_code_attribute_mode_id
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setBbCodeAttributeModeId(Integer bbCodeAttributeModeId) {
+ this.bbCodeAttributeModeId = bbCodeAttributeModeId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute_mode.bb_code_config_id
+ * @return the value of zfgbb.bb_code_attribute_mode.bb_code_config_id
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public Integer getBbCodeConfigId() {
+ return bbCodeConfigId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute_mode.bb_code_config_id
+ * @param bbCodeConfigId the value for zfgbb.bb_code_attribute_mode.bb_code_config_id
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setBbCodeConfigId(Integer bbCodeConfigId) {
+ this.bbCodeConfigId = bbCodeConfigId;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute_mode.content_is_attribute_flag
+ * @return the value of zfgbb.bb_code_attribute_mode.content_is_attribute_flag
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public Boolean getContentIsAttributeFlag() {
+ return contentIsAttributeFlag;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute_mode.content_is_attribute_flag
+ * @param contentIsAttributeFlag the value for zfgbb.bb_code_attribute_mode.content_is_attribute_flag
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setContentIsAttributeFlag(Boolean contentIsAttributeFlag) {
+ this.contentIsAttributeFlag = contentIsAttributeFlag;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute_mode.open_tag
+ * @return the value of zfgbb.bb_code_attribute_mode.open_tag
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public String getOpenTag() {
+ return openTag;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute_mode.open_tag
+ * @param openTag the value for zfgbb.bb_code_attribute_mode.open_tag
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setOpenTag(String openTag) {
+ this.openTag = openTag;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute_mode.close_tag
+ * @return the value of zfgbb.bb_code_attribute_mode.close_tag
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public String getCloseTag() {
+ return closeTag;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute_mode.close_tag
+ * @param closeTag the value for zfgbb.bb_code_attribute_mode.close_tag
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setCloseTag(String closeTag) {
+ this.closeTag = closeTag;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute_mode.output_content_flag
+ * @return the value of zfgbb.bb_code_attribute_mode.output_content_flag
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public Boolean getOutputContentFlag() {
+ return outputContentFlag;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute_mode.output_content_flag
+ * @param outputContentFlag the value for zfgbb.bb_code_attribute_mode.output_content_flag
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setOutputContentFlag(Boolean outputContentFlag) {
+ this.outputContentFlag = outputContentFlag;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute_mode.created_ts
+ * @return the value of zfgbb.bb_code_attribute_mode.created_ts
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public LocalDateTime getCreatedTs() {
+ return createdTs;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute_mode.created_ts
+ * @param createdTs the value for zfgbb.bb_code_attribute_mode.created_ts
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setCreatedTs(LocalDateTime createdTs) {
+ this.createdTs = createdTs;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method returns the value of the database column zfgbb.bb_code_attribute_mode.updated_ts
+ * @return the value of zfgbb.bb_code_attribute_mode.updated_ts
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public LocalDateTime getUpdatedTs() {
+ return updatedTs;
+ }
+
+ /**
+ * This method was generated by MyBatis Generator. This method sets the value of the database column zfgbb.bb_code_attribute_mode.updated_ts
+ * @param updatedTs the value for zfgbb.bb_code_attribute_mode.updated_ts
+ * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
+ */
+ public void setUpdatedTs(LocalDateTime updatedTs) {
+ this.updatedTs = updatedTs;
+ }
+
+ @Override
+ public Integer getPkId() {
+ return bbCodeAttributeModeId;
+ }
+
+ @Override
+ public LocalDateTime getUpdatedTime() {
+ return updatedTs;
+ }
+
+ @Override
+ public LocalDateTime getCreatedTime() {
+ return createdTs;
+ }
}
\ No newline at end of file
diff --git a/src/main/java/com/zfgc/zfgbb/dbo/BBCodeAttributeModeDboExample.java b/src/main/java/com/zfgc/zfgbb/dbo/BBCodeAttributeModeDboExample.java
index 1fb3ccc..b8ad72a 100644
--- a/src/main/java/com/zfgc/zfgbb/dbo/BBCodeAttributeModeDboExample.java
+++ b/src/main/java/com/zfgc/zfgbb/dbo/BBCodeAttributeModeDboExample.java
@@ -1,763 +1,763 @@
-package com.zfgc.zfgbb.dbo;
-
-
-import java.util.ArrayList;
-import java.util.List;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-
-public class BBCodeAttributeModeDboExample {
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database table zfgbb.bb_code_attribute_mode
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- protected String orderByClause;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database table zfgbb.bb_code_attribute_mode
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- protected boolean distinct;
- /**
- * This field was generated by MyBatis Generator. This field corresponds to the database table zfgbb.bb_code_attribute_mode
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- protected List oredCriteria;
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute_mode
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public BBCodeAttributeModeDboExample() {
- oredCriteria = new ArrayList<>();
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute_mode
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setOrderByClause(String orderByClause) {
- this.orderByClause = orderByClause;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute_mode
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public String getOrderByClause() {
- return orderByClause;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute_mode
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void setDistinct(boolean distinct) {
- this.distinct = distinct;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute_mode
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public boolean isDistinct() {
- return distinct;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute_mode
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public List getOredCriteria() {
- return oredCriteria;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute_mode
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void or(Criteria criteria) {
- oredCriteria.add(criteria);
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute_mode
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public Criteria or() {
- Criteria criteria = createCriteriaInternal();
- oredCriteria.add(criteria);
- return criteria;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute_mode
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public Criteria createCriteria() {
- Criteria criteria = createCriteriaInternal();
- if (oredCriteria.size() == 0) {
- oredCriteria.add(criteria);
- }
- return criteria;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute_mode
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- protected Criteria createCriteriaInternal() {
- Criteria criteria = new Criteria();
- return criteria;
- }
-
- /**
- * This method was generated by MyBatis Generator. This method corresponds to the database table zfgbb.bb_code_attribute_mode
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- public void clear() {
- oredCriteria.clear();
- orderByClause = null;
- distinct = false;
- }
-
- /**
- * This class was generated by MyBatis Generator. This class corresponds to the database table zfgbb.bb_code_attribute_mode
- * @mbg.generated Thu Aug 22 20:55:49 EDT 2024
- */
- protected abstract static class GeneratedCriteria {
- protected List criteria;
-
- protected GeneratedCriteria() {
- super();
- criteria = new ArrayList<>();
- }
-
- public boolean isValid() {
- return criteria.size() > 0;
- }
-
- public List getAllCriteria() {
- return criteria;
- }
-
- public List getCriteria() {
- return criteria;
- }
-
- protected void addCriterion(String condition) {
- if (condition == null) {
- throw new RuntimeException("Value for condition cannot be null");
- }
- criteria.add(new Criterion(condition));
- }
-
- protected void addCriterion(String condition, Object value, String property) {
- if (value == null) {
- throw new RuntimeException("Value for " + property + " cannot be null");
- }
- criteria.add(new Criterion(condition, value));
- }
-
- protected void addCriterion(String condition, Object value1, Object value2, String property) {
- if (value1 == null || value2 == null) {
- throw new RuntimeException("Between values for " + property + " cannot be null");
- }
- criteria.add(new Criterion(condition, value1, value2));
- }
-
- public Criteria andBbCodeAttributeModeIdIsNull() {
- addCriterion("bb_code_attribute_mode_id is null");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdIsNotNull() {
- addCriterion("bb_code_attribute_mode_id is not null");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdEqualTo(Integer value) {
- addCriterion("bb_code_attribute_mode_id =", value, "bbCodeAttributeModeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdNotEqualTo(Integer value) {
- addCriterion("bb_code_attribute_mode_id <>", value, "bbCodeAttributeModeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdGreaterThan(Integer value) {
- addCriterion("bb_code_attribute_mode_id >", value, "bbCodeAttributeModeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdGreaterThanOrEqualTo(Integer value) {
- addCriterion("bb_code_attribute_mode_id >=", value, "bbCodeAttributeModeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdLessThan(Integer value) {
- addCriterion("bb_code_attribute_mode_id <", value, "bbCodeAttributeModeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdLessThanOrEqualTo(Integer value) {
- addCriterion("bb_code_attribute_mode_id <=", value, "bbCodeAttributeModeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdIn(List values) {
- addCriterion("bb_code_attribute_mode_id in", values, "bbCodeAttributeModeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdNotIn(List values) {
- addCriterion("bb_code_attribute_mode_id not in", values, "bbCodeAttributeModeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdBetween(Integer value1, Integer value2) {
- addCriterion("bb_code_attribute_mode_id between", value1, value2, "bbCodeAttributeModeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeAttributeModeIdNotBetween(Integer value1, Integer value2) {
- addCriterion("bb_code_attribute_mode_id not between", value1, value2, "bbCodeAttributeModeId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeConfigIdIsNull() {
- addCriterion("bb_code_config_id is null");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeConfigIdIsNotNull() {
- addCriterion("bb_code_config_id is not null");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeConfigIdEqualTo(Integer value) {
- addCriterion("bb_code_config_id =", value, "bbCodeConfigId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeConfigIdNotEqualTo(Integer value) {
- addCriterion("bb_code_config_id <>", value, "bbCodeConfigId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeConfigIdGreaterThan(Integer value) {
- addCriterion("bb_code_config_id >", value, "bbCodeConfigId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeConfigIdGreaterThanOrEqualTo(Integer value) {
- addCriterion("bb_code_config_id >=", value, "bbCodeConfigId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeConfigIdLessThan(Integer value) {
- addCriterion("bb_code_config_id <", value, "bbCodeConfigId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeConfigIdLessThanOrEqualTo(Integer value) {
- addCriterion("bb_code_config_id <=", value, "bbCodeConfigId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeConfigIdIn(List values) {
- addCriterion("bb_code_config_id in", values, "bbCodeConfigId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeConfigIdNotIn(List values) {
- addCriterion("bb_code_config_id not in", values, "bbCodeConfigId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeConfigIdBetween(Integer value1, Integer value2) {
- addCriterion("bb_code_config_id between", value1, value2, "bbCodeConfigId");
- return (Criteria) this;
- }
-
- public Criteria andBbCodeConfigIdNotBetween(Integer value1, Integer value2) {
- addCriterion("bb_code_config_id not between", value1, value2, "bbCodeConfigId");
- return (Criteria) this;
- }
-
- public Criteria andContentIsAttributeFlagIsNull() {
- addCriterion("content_is_attribute_flag is null");
- return (Criteria) this;
- }
-
- public Criteria andContentIsAttributeFlagIsNotNull() {
- addCriterion("content_is_attribute_flag is not null");
- return (Criteria) this;
- }
-
- public Criteria andContentIsAttributeFlagEqualTo(Boolean value) {
- addCriterion("content_is_attribute_flag =", value, "contentIsAttributeFlag");
- return (Criteria) this;
- }
-
- public Criteria andContentIsAttributeFlagNotEqualTo(Boolean value) {
- addCriterion("content_is_attribute_flag <>", value, "contentIsAttributeFlag");
- return (Criteria) this;
- }
-
- public Criteria andContentIsAttributeFlagGreaterThan(Boolean value) {
- addCriterion("content_is_attribute_flag >", value, "contentIsAttributeFlag");
- return (Criteria) this;
- }
-
- public Criteria andContentIsAttributeFlagGreaterThanOrEqualTo(Boolean value) {
- addCriterion("content_is_attribute_flag >=", value, "contentIsAttributeFlag");
- return (Criteria) this;
- }
-
- public Criteria andContentIsAttributeFlagLessThan(Boolean value) {
- addCriterion("content_is_attribute_flag <", value, "contentIsAttributeFlag");
- return (Criteria) this;
- }
-
- public Criteria andContentIsAttributeFlagLessThanOrEqualTo(Boolean value) {
- addCriterion("content_is_attribute_flag <=", value, "contentIsAttributeFlag");
- return (Criteria) this;
- }
-
- public Criteria andContentIsAttributeFlagIn(List