Compare commits
merge into: yanjiaqing:dev
yanjiaqing:Huang
yanjiaqing:consume_lly
yanjiaqing:detached
yanjiaqing:detached2
yanjiaqing:dev
yanjiaqing:hqz
yanjiaqing:lhl
yanjiaqing:ljl
yanjiaqing:lly
yanjiaqing:master
yanjiaqing:recharge_audit_huangqizhen
yanjiaqing:recharge_rate-and-refund-zlp
yanjiaqing:sjb
pull from: yanjiaqing:master
yanjiaqing:Huang
yanjiaqing:consume_lly
yanjiaqing:detached
yanjiaqing:detached2
yanjiaqing:dev
yanjiaqing:hqz
yanjiaqing:lhl
yanjiaqing:ljl
yanjiaqing:lly
yanjiaqing:master
yanjiaqing:recharge_audit_huangqizhen
yanjiaqing:recharge_rate-and-refund-zlp
yanjiaqing:sjb
No commits in common. 'dev' and 'master' have entirely different histories.
171 changed files with 119 additions and 12512 deletions
-
2.gitattributes
-
19.mvn/wrapper/maven-wrapper.properties
-
0java/.gitignore
-
87java/pom.xml
-
13java/src/main/java/gold/java/JavaApplication.java
-
8java/src/main/resources/application.properties
-
6java/src/main/resources/static/index.html
-
4java/src/test/java/gold/java/JavaApplicationTests.java
-
259mvnw
-
149mvnw.cmd
-
185pom.xml
-
22src/main/java/com/example/demo/DemoApplication.java
-
104src/main/java/com/example/demo/Util/BaseDES.java
-
100src/main/java/com/example/demo/Util/BaseDES2.java
-
203src/main/java/com/example/demo/Util/CaptchaUtil.java
-
7src/main/java/com/example/demo/Util/CheckIfNullUtil.java
-
107src/main/java/com/example/demo/Util/DESGB.java
-
227src/main/java/com/example/demo/Util/GoldTistV2.java
-
195src/main/java/com/example/demo/Util/JWTUtil.java
-
39src/main/java/com/example/demo/Util/MD5Util.java
-
27src/main/java/com/example/demo/Util/ReplaceStreamFilter.java
-
123src/main/java/com/example/demo/Util/RequestWrapper.java
-
39src/main/java/com/example/demo/Util/TokenPayload.java
-
54src/main/java/com/example/demo/Util/UploadUtil.java
-
14src/main/java/com/example/demo/config/AppConfig.java
-
33src/main/java/com/example/demo/config/CacheConfig.java
-
50src/main/java/com/example/demo/config/DBSrcArticle.java
-
28src/main/java/com/example/demo/config/JacksonConfig.java
-
28src/main/java/com/example/demo/config/LocalDateTimeDeserializer.java
-
27src/main/java/com/example/demo/config/LocalDateTimeSerializer.java
-
62src/main/java/com/example/demo/config/Mysql1DataSourceConfig.java
-
60src/main/java/com/example/demo/config/Mysql2DataSourceConfig.java
-
46src/main/java/com/example/demo/config/Mysql3DataSourceConfig.java
-
46src/main/java/com/example/demo/config/RedisConfig.java
-
17src/main/java/com/example/demo/config/WebClientConfig.java
-
17src/main/java/com/example/demo/config/WebConfig.java
-
43src/main/java/com/example/demo/config/dBSrcUser.java
-
64src/main/java/com/example/demo/controller/ActivityController.java
-
118src/main/java/com/example/demo/controller/AdminController.java
-
196src/main/java/com/example/demo/controller/AuditController.java
-
99src/main/java/com/example/demo/controller/ConsumeController.java
-
42src/main/java/com/example/demo/controller/DetailController.java
-
77src/main/java/com/example/demo/controller/DetailYController.java
-
117src/main/java/com/example/demo/controller/DouController.java
-
9src/main/java/com/example/demo/controller/KafkaConfig.java
-
76src/main/java/com/example/demo/controller/KafkaConsumer.java
-
16src/main/java/com/example/demo/controller/KafkaProducer.java
-
58src/main/java/com/example/demo/controller/OneController.java
-
24src/main/java/com/example/demo/controller/PermissionController.java
-
31src/main/java/com/example/demo/controller/ProductController.java
-
75src/main/java/com/example/demo/controller/RateController.java
-
125src/main/java/com/example/demo/controller/RechargeController.java
-
109src/main/java/com/example/demo/controller/RefundController.java
-
112src/main/java/com/example/demo/controller/StatisticsController.java
-
29src/main/java/com/example/demo/controller/UploadController.java
-
53src/main/java/com/example/demo/controller/UserController.java
-
29src/main/java/com/example/demo/domain/dou/Balance.java
-
25src/main/java/com/example/demo/domain/dou/Member.java
-
44src/main/java/com/example/demo/domain/dou/Pay.java
-
30src/main/java/com/example/demo/domain/dou/RechargeTotal.java
-
26src/main/java/com/example/demo/domain/dou/Records.java
-
17src/main/java/com/example/demo/domain/dou/Searchinfo.java
-
41src/main/java/com/example/demo/domain/dou/Spend.java
-
37src/main/java/com/example/demo/domain/dou/SpendTotal.java
-
28src/main/java/com/example/demo/domain/dou/Total.java
-
28src/main/java/com/example/demo/domain/dou/Yve.java
-
17src/main/java/com/example/demo/domain/dou/YveTotal.java
-
59src/main/java/com/example/demo/domain/entity/Activity.java
-
160src/main/java/com/example/demo/domain/entity/Admin.java
-
56src/main/java/com/example/demo/domain/entity/Audit.java
-
78src/main/java/com/example/demo/domain/entity/Detail.java
-
90src/main/java/com/example/demo/domain/entity/DetailY.java
-
24src/main/java/com/example/demo/domain/entity/Index.java
-
14src/main/java/com/example/demo/domain/entity/Permission.java
-
27src/main/java/com/example/demo/domain/entity/Product.java
-
38src/main/java/com/example/demo/domain/entity/Rate.java
-
51src/main/java/com/example/demo/domain/entity/Recharge.java
-
40src/main/java/com/example/demo/domain/entity/User.java
-
53src/main/java/com/example/demo/domain/entity/UserDetailExport.java
-
31src/main/java/com/example/demo/domain/entity/UserGold.java
-
59src/main/java/com/example/demo/domain/vo/ConsumeDetail.java
-
34src/main/java/com/example/demo/domain/vo/DetailExport.java
-
61src/main/java/com/example/demo/domain/vo/DetailVo.java
-
59src/main/java/com/example/demo/domain/vo/DetailYVo.java
-
34src/main/java/com/example/demo/domain/vo/DetailYgold.java
-
39src/main/java/com/example/demo/domain/vo/ERP.java
-
53src/main/java/com/example/demo/domain/vo/Meium.java
-
40src/main/java/com/example/demo/domain/vo/Page.java
-
37src/main/java/com/example/demo/domain/vo/RechargeA.java
-
59src/main/java/com/example/demo/domain/vo/RechargeVo.java
-
45src/main/java/com/example/demo/domain/vo/RefundA.java
-
48src/main/java/com/example/demo/domain/vo/Result.java
-
55src/main/java/com/example/demo/domain/vo/Statistics.java
-
25src/main/java/com/example/demo/domain/vo/Statisticss.java
-
99src/main/java/com/example/demo/domain/vo/SumCoin.java
-
30src/main/java/com/example/demo/domain/vo/SumConsume.java
-
30src/main/java/com/example/demo/domain/vo/SumDetailY.java
-
33src/main/java/com/example/demo/domain/vo/Table.java
-
27src/main/java/com/example/demo/domain/vo/UserConsumeCoin.java
-
34src/main/java/com/example/demo/domain/vo/UserVo.java
@ -1,2 +0,0 @@ |
|||
/mvnw text eol=lf |
|||
*.cmd text eol=crlf |
@ -1,19 +0,0 @@ |
|||
# Licensed to the Apache Software Foundation (ASF) under one |
|||
# or more contributor license agreements. See the NOTICE file |
|||
# distributed with this work for additional information |
|||
# regarding copyright ownership. The ASF licenses this file |
|||
# to you under the Apache License, Version 2.0 (the |
|||
# "License"); you may not use this file except in compliance |
|||
# with the License. You may obtain a copy of the License at |
|||
# |
|||
# http://www.apache.org/licenses/LICENSE-2.0 |
|||
# |
|||
# Unless required by applicable law or agreed to in writing, |
|||
# software distributed under the License is distributed on an |
|||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
|||
# KIND, either express or implied. See the License for the |
|||
# specific language governing permissions and limitations |
|||
# under the License. |
|||
wrapperVersion=3.3.2 |
|||
distributionType=only-script |
|||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip |
@ -0,0 +1,87 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
<groupId>gold</groupId> |
|||
<artifactId>java</artifactId> |
|||
<version>0.0.1-SNAPSHOT</version> |
|||
<name>java</name> |
|||
<description>java</description> |
|||
<properties> |
|||
<java.version>1.8</java.version> |
|||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
|||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
|||
<spring-boot.version>2.6.13</spring-boot.version> |
|||
</properties> |
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-web</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.mybatis.spring.boot</groupId> |
|||
<artifactId>mybatis-spring-boot-starter</artifactId> |
|||
<version>2.2.2</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>com.mysql</groupId> |
|||
<artifactId>mysql-connector-j</artifactId> |
|||
<scope>runtime</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.projectlombok</groupId> |
|||
<artifactId>lombok</artifactId> |
|||
<optional>true</optional> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-test</artifactId> |
|||
<scope>test</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
<dependencyManagement> |
|||
<dependencies> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-dependencies</artifactId> |
|||
<version>${spring-boot.version}</version> |
|||
<type>pom</type> |
|||
<scope>import</scope> |
|||
</dependency> |
|||
</dependencies> |
|||
</dependencyManagement> |
|||
|
|||
<build> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.apache.maven.plugins</groupId> |
|||
<artifactId>maven-compiler-plugin</artifactId> |
|||
<version>3.8.1</version> |
|||
<configuration> |
|||
<source>1.8</source> |
|||
<target>1.8</target> |
|||
<encoding>UTF-8</encoding> |
|||
</configuration> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-maven-plugin</artifactId> |
|||
<version>${spring-boot.version}</version> |
|||
<configuration> |
|||
<mainClass>gold.java.JavaApplication</mainClass> |
|||
<skip>true</skip> |
|||
</configuration> |
|||
<executions> |
|||
<execution> |
|||
<id>repackage</id> |
|||
<goals> |
|||
<goal>repackage</goal> |
|||
</goals> |
|||
</execution> |
|||
</executions> |
|||
</plugin> |
|||
</plugins> |
|||
</build> |
|||
|
|||
</project> |
@ -0,0 +1,13 @@ |
|||
package gold.java; |
|||
|
|||
import org.springframework.boot.SpringApplication; |
|||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|||
|
|||
@SpringBootApplication |
|||
public class JavaApplication { |
|||
|
|||
public static void main(String[] args) { |
|||
SpringApplication.run(JavaApplication.class, args); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,8 @@ |
|||
# 应用服务 WEB 访问端口 |
|||
server.port=8080 |
|||
#下面这些内容是为了让MyBatis映射 |
|||
#指定Mybatis的Mapper文件 |
|||
mybatis.mapper-locations=classpath:mappers/*xml |
|||
#指定Mybatis的实体目录 |
|||
mybatis.type-aliases-package=gold.java.mybatis.entity |
|||
|
@ -0,0 +1,6 @@ |
|||
<html> |
|||
<body> |
|||
<h1>hello word!!!</h1> |
|||
<p>this is a html page</p> |
|||
</body> |
|||
</html> |
@ -1,10 +1,10 @@ |
|||
package com.example.demo; |
|||
package gold.java; |
|||
|
|||
import org.junit.jupiter.api.Test; |
|||
import org.springframework.boot.test.context.SpringBootTest; |
|||
|
|||
@SpringBootTest |
|||
class DemoApplicationTests { |
|||
class JavaApplicationTests { |
|||
|
|||
@Test |
|||
void contextLoads() { |
@ -1,259 +0,0 @@ |
|||
#!/bin/sh |
|||
# ---------------------------------------------------------------------------- |
|||
# Licensed to the Apache Software Foundation (ASF) under one |
|||
# or more contributor license agreements. See the NOTICE file |
|||
# distributed with this work for additional information |
|||
# regarding copyright ownership. The ASF licenses this file |
|||
# to you under the Apache License, Version 2.0 (the |
|||
# "License"); you may not use this file except in compliance |
|||
# with the License. You may obtain a copy of the License at |
|||
# |
|||
# http://www.apache.org/licenses/LICENSE-2.0 |
|||
# |
|||
# Unless required by applicable law or agreed to in writing, |
|||
# software distributed under the License is distributed on an |
|||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
|||
# KIND, either express or implied. See the License for the |
|||
# specific language governing permissions and limitations |
|||
# under the License. |
|||
# ---------------------------------------------------------------------------- |
|||
|
|||
# ---------------------------------------------------------------------------- |
|||
# Apache Maven Wrapper startup batch script, version 3.3.2 |
|||
# |
|||
# Optional ENV vars |
|||
# ----------------- |
|||
# JAVA_HOME - location of a JDK home dir, required when download maven via java source |
|||
# MVNW_REPOURL - repo url base for downloading maven distribution |
|||
# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven |
|||
# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output |
|||
# ---------------------------------------------------------------------------- |
|||
|
|||
set -euf |
|||
[ "${MVNW_VERBOSE-}" != debug ] || set -x |
|||
|
|||
# OS specific support. |
|||
native_path() { printf %s\\n "$1"; } |
|||
case "$(uname)" in |
|||
CYGWIN* | MINGW*) |
|||
[ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" |
|||
native_path() { cygpath --path --windows "$1"; } |
|||
;; |
|||
esac |
|||
|
|||
# set JAVACMD and JAVACCMD |
|||
set_java_home() { |
|||
# For Cygwin and MinGW, ensure paths are in Unix format before anything is touched |
|||
if [ -n "${JAVA_HOME-}" ]; then |
|||
if [ -x "$JAVA_HOME/jre/sh/java" ]; then |
|||
# IBM's JDK on AIX uses strange locations for the executables |
|||
JAVACMD="$JAVA_HOME/jre/sh/java" |
|||
JAVACCMD="$JAVA_HOME/jre/sh/javac" |
|||
else |
|||
JAVACMD="$JAVA_HOME/bin/java" |
|||
JAVACCMD="$JAVA_HOME/bin/javac" |
|||
|
|||
if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then |
|||
echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 |
|||
echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 |
|||
return 1 |
|||
fi |
|||
fi |
|||
else |
|||
JAVACMD="$( |
|||
'set' +e |
|||
'unset' -f command 2>/dev/null |
|||
'command' -v java |
|||
)" || : |
|||
JAVACCMD="$( |
|||
'set' +e |
|||
'unset' -f command 2>/dev/null |
|||
'command' -v javac |
|||
)" || : |
|||
|
|||
if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then |
|||
echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 |
|||
return 1 |
|||
fi |
|||
fi |
|||
} |
|||
|
|||
# hash string like Java String::hashCode |
|||
hash_string() { |
|||
str="${1:-}" h=0 |
|||
while [ -n "$str" ]; do |
|||
char="${str%"${str#?}"}" |
|||
h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) |
|||
str="${str#?}" |
|||
done |
|||
printf %x\\n $h |
|||
} |
|||
|
|||
verbose() { :; } |
|||
[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } |
|||
|
|||
die() { |
|||
printf %s\\n "$1" >&2 |
|||
exit 1 |
|||
} |
|||
|
|||
trim() { |
|||
# MWRAPPER-139: |
|||
# Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. |
|||
# Needed for removing poorly interpreted newline sequences when running in more |
|||
# exotic environments such as mingw bash on Windows. |
|||
printf "%s" "${1}" | tr -d '[:space:]' |
|||
} |
|||
|
|||
# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties |
|||
while IFS="=" read -r key value; do |
|||
case "${key-}" in |
|||
distributionUrl) distributionUrl=$(trim "${value-}") ;; |
|||
distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; |
|||
esac |
|||
done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties" |
|||
[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties" |
|||
|
|||
case "${distributionUrl##*/}" in |
|||
maven-mvnd-*bin.*) |
|||
MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ |
|||
case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in |
|||
*AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; |
|||
:Darwin*x86_64) distributionPlatform=darwin-amd64 ;; |
|||
:Darwin*arm64) distributionPlatform=darwin-aarch64 ;; |
|||
:Linux*x86_64*) distributionPlatform=linux-amd64 ;; |
|||
*) |
|||
echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 |
|||
distributionPlatform=linux-amd64 |
|||
;; |
|||
esac |
|||
distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" |
|||
;; |
|||
maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; |
|||
*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; |
|||
esac |
|||
|
|||
# apply MVNW_REPOURL and calculate MAVEN_HOME |
|||
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash> |
|||
[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" |
|||
distributionUrlName="${distributionUrl##*/}" |
|||
distributionUrlNameMain="${distributionUrlName%.*}" |
|||
distributionUrlNameMain="${distributionUrlNameMain%-bin}" |
|||
MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" |
|||
MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" |
|||
|
|||
exec_maven() { |
|||
unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : |
|||
exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" |
|||
} |
|||
|
|||
if [ -d "$MAVEN_HOME" ]; then |
|||
verbose "found existing MAVEN_HOME at $MAVEN_HOME" |
|||
exec_maven "$@" |
|||
fi |
|||
|
|||
case "${distributionUrl-}" in |
|||
*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; |
|||
*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; |
|||
esac |
|||
|
|||
# prepare tmp dir |
|||
if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then |
|||
clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } |
|||
trap clean HUP INT TERM EXIT |
|||
else |
|||
die "cannot create temp dir" |
|||
fi |
|||
|
|||
mkdir -p -- "${MAVEN_HOME%/*}" |
|||
|
|||
# Download and Install Apache Maven |
|||
verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." |
|||
verbose "Downloading from: $distributionUrl" |
|||
verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" |
|||
|
|||
# select .zip or .tar.gz |
|||
if ! command -v unzip >/dev/null; then |
|||
distributionUrl="${distributionUrl%.zip}.tar.gz" |
|||
distributionUrlName="${distributionUrl##*/}" |
|||
fi |
|||
|
|||
# verbose opt |
|||
__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' |
|||
[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v |
|||
|
|||
# normalize http auth |
|||
case "${MVNW_PASSWORD:+has-password}" in |
|||
'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; |
|||
has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; |
|||
esac |
|||
|
|||
if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then |
|||
verbose "Found wget ... using wget" |
|||
wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" |
|||
elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then |
|||
verbose "Found curl ... using curl" |
|||
curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" |
|||
elif set_java_home; then |
|||
verbose "Falling back to use Java to download" |
|||
javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" |
|||
targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" |
|||
cat >"$javaSource" <<-END |
|||
public class Downloader extends java.net.Authenticator |
|||
{ |
|||
protected java.net.PasswordAuthentication getPasswordAuthentication() |
|||
{ |
|||
return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); |
|||
} |
|||
public static void main( String[] args ) throws Exception |
|||
{ |
|||
setDefault( new Downloader() ); |
|||
java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); |
|||
} |
|||
} |
|||
END |
|||
# For Cygwin/MinGW, switch paths to Windows format before running javac and java |
|||
verbose " - Compiling Downloader.java ..." |
|||
"$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" |
|||
verbose " - Running Downloader.java ..." |
|||
"$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" |
|||
fi |
|||
|
|||
# If specified, validate the SHA-256 sum of the Maven distribution zip file |
|||
if [ -n "${distributionSha256Sum-}" ]; then |
|||
distributionSha256Result=false |
|||
if [ "$MVN_CMD" = mvnd.sh ]; then |
|||
echo "Checksum validation is not supported for maven-mvnd." >&2 |
|||
echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 |
|||
exit 1 |
|||
elif command -v sha256sum >/dev/null; then |
|||
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then |
|||
distributionSha256Result=true |
|||
fi |
|||
elif command -v shasum >/dev/null; then |
|||
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then |
|||
distributionSha256Result=true |
|||
fi |
|||
else |
|||
echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 |
|||
echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 |
|||
exit 1 |
|||
fi |
|||
if [ $distributionSha256Result = false ]; then |
|||
echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 |
|||
echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 |
|||
exit 1 |
|||
fi |
|||
fi |
|||
|
|||
# unzip and move |
|||
if command -v unzip >/dev/null; then |
|||
unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" |
|||
else |
|||
tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" |
|||
fi |
|||
printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url" |
|||
mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" |
|||
|
|||
clean || : |
|||
exec_maven "$@" |
@ -1,149 +0,0 @@ |
|||
<# : batch portion |
|||
@REM ---------------------------------------------------------------------------- |
|||
@REM Licensed to the Apache Software Foundation (ASF) under one |
|||
@REM or more contributor license agreements. See the NOTICE file |
|||
@REM distributed with this work for additional information |
|||
@REM regarding copyright ownership. The ASF licenses this file |
|||
@REM to you under the Apache License, Version 2.0 (the |
|||
@REM "License"); you may not use this file except in compliance |
|||
@REM with the License. You may obtain a copy of the License at |
|||
@REM |
|||
@REM http://www.apache.org/licenses/LICENSE-2.0 |
|||
@REM |
|||
@REM Unless required by applicable law or agreed to in writing, |
|||
@REM software distributed under the License is distributed on an |
|||
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
|||
@REM KIND, either express or implied. See the License for the |
|||
@REM specific language governing permissions and limitations |
|||
@REM under the License. |
|||
@REM ---------------------------------------------------------------------------- |
|||
|
|||
@REM ---------------------------------------------------------------------------- |
|||
@REM Apache Maven Wrapper startup batch script, version 3.3.2 |
|||
@REM |
|||
@REM Optional ENV vars |
|||
@REM MVNW_REPOURL - repo url base for downloading maven distribution |
|||
@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven |
|||
@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output |
|||
@REM ---------------------------------------------------------------------------- |
|||
|
|||
@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) |
|||
@SET __MVNW_CMD__= |
|||
@SET __MVNW_ERROR__= |
|||
@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% |
|||
@SET PSModulePath= |
|||
@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( |
|||
IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) |
|||
) |
|||
@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% |
|||
@SET __MVNW_PSMODULEP_SAVE= |
|||
@SET __MVNW_ARG0_NAME__= |
|||
@SET MVNW_USERNAME= |
|||
@SET MVNW_PASSWORD= |
|||
@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*) |
|||
@echo Cannot start maven from wrapper >&2 && exit /b 1 |
|||
@GOTO :EOF |
|||
: end batch / begin powershell #> |
|||
|
|||
$ErrorActionPreference = "Stop" |
|||
if ($env:MVNW_VERBOSE -eq "true") { |
|||
$VerbosePreference = "Continue" |
|||
} |
|||
|
|||
# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties |
|||
$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl |
|||
if (!$distributionUrl) { |
|||
Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" |
|||
} |
|||
|
|||
switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { |
|||
"maven-mvnd-*" { |
|||
$USE_MVND = $true |
|||
$distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" |
|||
$MVN_CMD = "mvnd.cmd" |
|||
break |
|||
} |
|||
default { |
|||
$USE_MVND = $false |
|||
$MVN_CMD = $script -replace '^mvnw','mvn' |
|||
break |
|||
} |
|||
} |
|||
|
|||
# apply MVNW_REPOURL and calculate MAVEN_HOME |
|||
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash> |
|||
if ($env:MVNW_REPOURL) { |
|||
$MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } |
|||
$distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')" |
|||
} |
|||
$distributionUrlName = $distributionUrl -replace '^.*/','' |
|||
$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' |
|||
$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain" |
|||
if ($env:MAVEN_USER_HOME) { |
|||
$MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain" |
|||
} |
|||
$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' |
|||
$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" |
|||
|
|||
if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { |
|||
Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" |
|||
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" |
|||
exit $? |
|||
} |
|||
|
|||
if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { |
|||
Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" |
|||
} |
|||
|
|||
# prepare tmp dir |
|||
$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile |
|||
$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" |
|||
$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null |
|||
trap { |
|||
if ($TMP_DOWNLOAD_DIR.Exists) { |
|||
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } |
|||
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } |
|||
} |
|||
} |
|||
|
|||
New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null |
|||
|
|||
# Download and Install Apache Maven |
|||
Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." |
|||
Write-Verbose "Downloading from: $distributionUrl" |
|||
Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" |
|||
|
|||
$webclient = New-Object System.Net.WebClient |
|||
if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { |
|||
$webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) |
|||
} |
|||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 |
|||
$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null |
|||
|
|||
# If specified, validate the SHA-256 sum of the Maven distribution zip file |
|||
$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum |
|||
if ($distributionSha256Sum) { |
|||
if ($USE_MVND) { |
|||
Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." |
|||
} |
|||
Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash |
|||
if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { |
|||
Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." |
|||
} |
|||
} |
|||
|
|||
# unzip and move |
|||
Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null |
|||
Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null |
|||
try { |
|||
Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null |
|||
} catch { |
|||
if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { |
|||
Write-Error "fail to move MAVEN_HOME" |
|||
} |
|||
} finally { |
|||
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } |
|||
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } |
|||
} |
|||
|
|||
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" |
@ -1,185 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|||
<modelVersion>4.0.0</modelVersion> |
|||
<parent> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-parent</artifactId> |
|||
<version>3.3.6</version> |
|||
<relativePath/> <!-- lookup parent from repository --> |
|||
</parent> |
|||
<groupId>com.example</groupId> |
|||
<artifactId>demo</artifactId> |
|||
<version>0.0.2-SNAPSHOT</version> |
|||
<!-- <version>0.0.3-SNAPSHOT</version>--> |
|||
<name>demo</name> |
|||
<description>demo</description> |
|||
|
|||
<properties> |
|||
<java.version>1.8</java.version> |
|||
</properties> |
|||
<dependencies> |
|||
<!-- Maven --> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-thymeleaf</artifactId> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>com.zaxxer</groupId> |
|||
<artifactId>HikariCP</artifactId> |
|||
<version>5.1.0</version> |
|||
</dependency> |
|||
|
|||
<!-- <dependency>--> |
|||
<!-- <groupId>org.springframework.kafka</groupId>--> |
|||
<!-- <artifactId>spring-kafka</artifactId>--> |
|||
<!-- </dependency>--> |
|||
|
|||
|
|||
<!-- <dependency>--> |
|||
<!-- <groupId>com.101tec</groupId>--> |
|||
<!-- <artifactId>zkclient</artifactId>--> |
|||
<!-- <version>0.11</version>--> |
|||
<!-- </dependency>--> |
|||
<dependency> |
|||
<groupId>io.jsonwebtoken</groupId> |
|||
<artifactId>jjwt</artifactId> |
|||
<version>0.9.1</version> |
|||
</dependency> |
|||
<!-- 多数据源 --> |
|||
<dependency> |
|||
<groupId>com.alibaba</groupId> |
|||
<artifactId>druid</artifactId> |
|||
<version>1.2.9</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>mysql</groupId> |
|||
<artifactId>mysql-connector-java</artifactId> |
|||
<version>8.0.33</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>javax.xml.bind</groupId> |
|||
<artifactId>jaxb-api</artifactId> |
|||
<version>2.3.1</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-security</artifactId> |
|||
<version>3.3.6</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-data-redis</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-cache</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.apache.commons</groupId> |
|||
<artifactId>commons-pool2</artifactId> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-webflux</artifactId> |
|||
</dependency> |
|||
|
|||
|
|||
<!-- <dependency>--> |
|||
<!-- <groupId>org.springframework.boot</groupId>--> |
|||
<!-- <artifactId>spring-boot-starter-data-elasticsearch</artifactId>--> |
|||
<!-- </dependency>--> |
|||
<dependency> |
|||
<groupId>com.github.pagehelper</groupId> |
|||
<artifactId>pagehelper-spring-boot-starter</artifactId> |
|||
<version>1.4.6</version> |
|||
</dependency> |
|||
|
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-web</artifactId> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.mybatis.spring.boot</groupId> |
|||
<artifactId>mybatis-spring-boot-starter</artifactId> |
|||
<version>3.0.4</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.alibaba</groupId> |
|||
<artifactId>easyexcel</artifactId> |
|||
<version>3.1.3</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.mybatis</groupId> |
|||
<artifactId>mybatis</artifactId> |
|||
<version>3.5.13</version> <!-- 确保是最新稳定版本 --> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-devtools</artifactId> |
|||
<scope>runtime</scope> |
|||
<optional>true</optional> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>mysql</groupId> |
|||
<artifactId>mysql-connector-java</artifactId> |
|||
<version>5.1.46</version> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.projectlombok</groupId> |
|||
<artifactId>lombok</artifactId> |
|||
<optional>true</optional> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-starter-test</artifactId> |
|||
<scope>test</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>org.mybatis.spring.boot</groupId> |
|||
<artifactId>mybatis-spring-boot-starter-test</artifactId> |
|||
<version>3.0.4</version> |
|||
<scope>test</scope> |
|||
</dependency> |
|||
<dependency> |
|||
<groupId>com.fasterxml.jackson.datatype</groupId> |
|||
<artifactId>jackson-datatype-jsr310</artifactId> |
|||
<version>2.17.3</version> <!-- 确保版本与您的jackson-databind版本兼容 --> |
|||
</dependency> |
|||
</dependencies> |
|||
|
|||
<build> |
|||
<plugins> |
|||
<plugin> |
|||
<groupId>org.apache.maven.plugins</groupId> |
|||
<artifactId>maven-compiler-plugin</artifactId> |
|||
</plugin> |
|||
<plugin> |
|||
<groupId>org.springframework.boot</groupId> |
|||
<artifactId>spring-boot-maven-plugin</artifactId> |
|||
<configuration> |
|||
<excludes> |
|||
<exclude> |
|||
<groupId>org.projectlombok</groupId> |
|||
<artifactId>lombok</artifactId> |
|||
</exclude> |
|||
</excludes> |
|||
</configuration> |
|||
</plugin> |
|||
</plugins> |
|||
<!--<resources> |
|||
<resource> |
|||
<directory>src/main/resources</directory> |
|||
<includes> |
|||
<include>**/*.xml</include> |
|||
</includes> |
|||
</resource> |
|||
</resources>--> |
|||
</build> |
|||
|
|||
</project> |
@ -1,22 +0,0 @@ |
|||
package com.example.demo; |
|||
|
|||
import org.mybatis.spring.annotation.MapperScan; |
|||
import org.springframework.boot.SpringApplication; |
|||
import org.springframework.boot.autoconfigure.SpringBootApplication; |
|||
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; |
|||
import org.springframework.cache.annotation.EnableCaching; |
|||
|
|||
|
|||
|
|||
@EnableCaching |
|||
@SpringBootApplication |
|||
@MapperScan(basePackages = "com.example.demo.mapper", sqlSessionTemplateRef = "mysql1SqlSessionTemplate") |
|||
@MapperScan(basePackages = "com.example.demo.mapperLink", sqlSessionTemplateRef = "mysql2SqlSessionTemplate") |
|||
@MapperScan(basePackages = "com.example.demo.mapperPay", sqlSessionTemplateRef = "mysql3SqlSessionTemplate") |
|||
public class DemoApplication { |
|||
|
|||
public static void main(String[] args) { |
|||
SpringApplication.run(DemoApplication.class, args); |
|||
} |
|||
|
|||
} |
@ -1,104 +0,0 @@ |
|||
package com.example.demo.Util; |
|||
|
|||
|
|||
import javax.crypto.Cipher; |
|||
import java.security.*; |
|||
|
|||
import static org.apache.poi.poifs.crypt.CipherAlgorithm.des; |
|||
|
|||
|
|||
public class BaseDES { |
|||
private static String strDefaultKey = "98hltleg"; |
|||
|
|||
private Cipher encryptCipher = null; |
|||
|
|||
private Cipher decryptCipher = null; |
|||
|
|||
public static String byteArr2HexStr(byte[] arrB) throws Exception { |
|||
int iLen = arrB.length; |
|||
|
|||
StringBuffer sb = new StringBuffer(iLen * 2); |
|||
for (int i = 0; i < iLen; i++) { |
|||
int intTmp = arrB[i]; |
|||
|
|||
while (intTmp < 0) { |
|||
intTmp = intTmp + 256; |
|||
} |
|||
|
|||
if (intTmp < 16) { |
|||
sb.append("0"); |
|||
} |
|||
sb.append(Integer.toString(intTmp, 16)); |
|||
} |
|||
return sb.toString(); |
|||
} |
|||
|
|||
public static byte[] hexStr2ByteArr(String strIn) { |
|||
byte[] arrB = strIn.getBytes(); |
|||
int iLen = arrB.length; |
|||
|
|||
byte[] arrOut = new byte[iLen / 2]; |
|||
for (int i = 0; i < iLen; i = i + 2) { |
|||
String strTmp = new String(arrB, i, 2); |
|||
arrOut[i / 2] = (byte) Integer.parseInt(strTmp, 16); |
|||
} |
|||
return arrOut; |
|||
} |
|||
|
|||
public BaseDES() throws Exception { |
|||
this(strDefaultKey); |
|||
} |
|||
|
|||
public BaseDES(String strKey) throws Exception { |
|||
|
|||
Key key = getKey(strKey.getBytes()); |
|||
|
|||
encryptCipher = Cipher.getInstance("DES"); |
|||
encryptCipher.init(Cipher.ENCRYPT_MODE, key); |
|||
|
|||
decryptCipher = Cipher.getInstance("DES"); |
|||
decryptCipher.init(Cipher.DECRYPT_MODE, key); |
|||
} |
|||
|
|||
public byte[] encrypt(byte[] arrB) throws Exception { |
|||
return encryptCipher.doFinal(arrB); |
|||
} |
|||
|
|||
public String encrypt(String strIn) throws Exception { |
|||
return byteArr2HexStr(encrypt(strIn.getBytes())); |
|||
} |
|||
|
|||
public byte[] decrypt(byte[] arrB) throws Exception { |
|||
return decryptCipher.doFinal(arrB); |
|||
} |
|||
|
|||
public String decrypt(String strIn) throws Exception { |
|||
return new String(decrypt(hexStr2ByteArr(strIn))); |
|||
} |
|||
|
|||
private Key getKey(byte[] arrBTmp) { |
|||
|
|||
byte[] arrB = new byte[8]; |
|||
|
|||
for (int i = 0; i < arrBTmp.length && i < arrB.length; i++) { |
|||
arrB[i] = arrBTmp[i]; |
|||
} |
|||
|
|||
Key key = new javax.crypto.spec.SecretKeySpec(arrB, "DES"); |
|||
|
|||
return key; |
|||
} |
|||
|
|||
|
|||
public static void main(String args[]) { |
|||
try { |
|||
BaseDES d = new BaseDES(); |
|||
String encryptedText = d.encrypt("94616995"); |
|||
System.out.println("加密结果:" + encryptedText); |
|||
System.out.println("加密字符串:90005179》"+d.encrypt("90005179")); |
|||
System.out.println("解密字符串:6aaef5277c050f7ae383f816651098ff》"+d.decrypt("6aaef5277c050f7ae383f816651098ff")); |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
} |
|||
} |
|||
} |
@ -1,100 +0,0 @@ |
|||
package com.example.demo.Util; |
|||
|
|||
|
|||
import javax.crypto.Cipher; |
|||
import java.security.Key; |
|||
|
|||
|
|||
public class BaseDES2 { |
|||
private static String strDefaultKey = "gold20@)"; |
|||
|
|||
private Cipher encryptCipher = null; |
|||
|
|||
private Cipher decryptCipher = null; |
|||
|
|||
public static String byteArr2HexStr(byte[] arrB) throws Exception { |
|||
int iLen = arrB.length; |
|||
|
|||
StringBuffer sb = new StringBuffer(iLen * 2); |
|||
for (int i = 0; i < iLen; i++) { |
|||
int intTmp = arrB[i]; |
|||
|
|||
while (intTmp < 0) { |
|||
intTmp = intTmp + 256; |
|||
} |
|||
|
|||
if (intTmp < 16) { |
|||
sb.append("0"); |
|||
} |
|||
sb.append(Integer.toString(intTmp, 16)); |
|||
} |
|||
return sb.toString(); |
|||
} |
|||
|
|||
public static byte[] hexStr2ByteArr(String strIn) { |
|||
byte[] arrB = strIn.getBytes(); |
|||
int iLen = arrB.length; |
|||
|
|||
byte[] arrOut = new byte[iLen / 2]; |
|||
for (int i = 0; i < iLen; i = i + 2) { |
|||
String strTmp = new String(arrB, i, 2); |
|||
arrOut[i / 2] = (byte) Integer.parseInt(strTmp, 16); |
|||
} |
|||
return arrOut; |
|||
} |
|||
|
|||
public BaseDES2() throws Exception { |
|||
this(strDefaultKey); |
|||
} |
|||
|
|||
public BaseDES2(String strKey) throws Exception { |
|||
|
|||
Key key = getKey(strKey.getBytes()); |
|||
|
|||
encryptCipher = Cipher.getInstance("DES"); |
|||
encryptCipher.init(Cipher.ENCRYPT_MODE, key); |
|||
|
|||
decryptCipher = Cipher.getInstance("DES"); |
|||
decryptCipher.init(Cipher.DECRYPT_MODE, key); |
|||
} |
|||
|
|||
public byte[] encrypt(byte[] arrB) throws Exception { |
|||
return encryptCipher.doFinal(arrB); |
|||
} |
|||
|
|||
public String encrypt(String strIn) throws Exception { |
|||
return byteArr2HexStr(encrypt(strIn.getBytes())); |
|||
} |
|||
|
|||
public byte[] decrypt(byte[] arrB) throws Exception { |
|||
return decryptCipher.doFinal(arrB); |
|||
} |
|||
|
|||
public String decrypt(String strIn) throws Exception { |
|||
return new String(decrypt(hexStr2ByteArr(strIn))); |
|||
} |
|||
|
|||
private Key getKey(byte[] arrBTmp) { |
|||
|
|||
byte[] arrB = new byte[8]; |
|||
|
|||
for (int i = 0; i < arrBTmp.length && i < arrB.length; i++) { |
|||
arrB[i] = arrBTmp[i]; |
|||
} |
|||
|
|||
Key key = new javax.crypto.spec.SecretKeySpec(arrB, "DES"); |
|||
|
|||
return key; |
|||
} |
|||
|
|||
|
|||
public static void main(String args[]) { |
|||
try { |
|||
BaseDES2 d = new BaseDES2(); |
|||
String encryptedText = d.encrypt("30003761"); |
|||
System.out.println("加密结果:" + encryptedText); |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
} |
|||
} |
|||
} |
@ -1,203 +0,0 @@ |
|||
package com.example.demo.Util; |
|||
|
|||
import jakarta.servlet.http.HttpServletResponse; |
|||
import org.apache.tomcat.util.codec.binary.Base64; |
|||
|
|||
import javax.imageio.ImageIO; |
|||
import java.awt.*; |
|||
import java.awt.image.BufferedImage; |
|||
import java.io.ByteArrayOutputStream; |
|||
import java.io.IOException; |
|||
import java.util.Random; |
|||
|
|||
/** |
|||
* Verification Code, 支持Base64 |
|||
* @author bobzyh |
|||
* |
|||
*/ |
|||
public class CaptchaUtil { |
|||
/* |
|||
* 宽度 |
|||
* 高度 |
|||
* 长度 |
|||
* 字符集 |
|||
*/ |
|||
private static final int WIDTH = 100; |
|||
private static final int HEIGHT = 38; |
|||
private static final int CODE_LENGTH = 4; |
|||
private static final String CODES = "1234567890ABCDEFGHJKLMNPQRSTUVWXYZ"; |
|||
private static final int LINE_COUNT = 15; |
|||
|
|||
|
|||
/** |
|||
* |
|||
* @param response 向客户端返回图片 |
|||
* @return 返回验证码的字符串 |
|||
*/ |
|||
public static String createCaptcha(HttpServletResponse response) { |
|||
return createCaptcha(WIDTH, HEIGHT, CODE_LENGTH, response); |
|||
} |
|||
/** |
|||
* |
|||
* @param width |
|||
* @param height |
|||
* @param codeLength |
|||
* @param response |
|||
* @return |
|||
*/ |
|||
public static String createCaptcha(int width, int height, int codeLength, HttpServletResponse response) { |
|||
// 生成字符串 |
|||
String captcha = randomCode(codeLength); |
|||
|
|||
// 生成图片 1+1=? |
|||
BufferedImage image = createImage(width, height, captcha); |
|||
|
|||
// 写入Response |
|||
try { |
|||
ImageIO.write(image, "jpeg", response.getOutputStream()); |
|||
|
|||
return captcha; |
|||
|
|||
} catch (IOException e) { |
|||
e.printStackTrace(); |
|||
} |
|||
|
|||
return null; |
|||
} |
|||
|
|||
/** |
|||
* 只创建图片 |
|||
* @param captcha |
|||
* @return |
|||
*/ |
|||
public static BufferedImage createImage(String captcha){ |
|||
return createImage(WIDTH, HEIGHT, captcha); |
|||
} |
|||
|
|||
public static BufferedImage createImage(int width, int height, String captcha) { |
|||
int codeLength = captcha.length(); |
|||
|
|||
// 生成图片 1+1=? |
|||
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); |
|||
|
|||
// 获取画板 |
|||
Graphics graphics = image.getGraphics(); |
|||
|
|||
// 绘制背景颜色 |
|||
graphics.setColor(randomBgColor()); |
|||
graphics.fillRect(0, 0, width, height); |
|||
|
|||
// 在 "画板"上生成干扰线条 |
|||
drawLine(width, height, graphics, LINE_COUNT); |
|||
|
|||
|
|||
// 绘制字符串 |
|||
graphics.setFont(new Font("Comic Sans MS", Font.BOLD, 30)); |
|||
for (int i = 0; i < captcha.length(); i++) { |
|||
graphics.setColor(randomFontColor()); |
|||
graphics.drawString(captcha.substring(i, i+1), i*(width/codeLength), (height)/2+30/6*2); |
|||
} |
|||
|
|||
// 释放资源 |
|||
graphics.dispose(); |
|||
|
|||
return image; |
|||
} |
|||
|
|||
public static String createBase64(String captcha){ |
|||
BufferedImage imgae = createImage(captcha); |
|||
return getBase64(imgae); |
|||
} |
|||
|
|||
public static String getBase64(BufferedImage image){ |
|||
String base64 = null; |
|||
|
|||
try { |
|||
ByteArrayOutputStream stream = new ByteArrayOutputStream(); |
|||
ImageIO.write(image, "jpeg", stream); |
|||
base64 = "data:image/jpeg;base64," + Base64.encodeBase64String(stream.toByteArray()); |
|||
} catch (IOException e) { |
|||
e.printStackTrace(); |
|||
} |
|||
return base64; |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 绘制干扰线 |
|||
* @param width |
|||
* @param height |
|||
* @param graphics |
|||
* @param count |
|||
*/ |
|||
private static void drawLine(int width, int height, Graphics graphics, int count) { |
|||
Random random = new Random(); |
|||
|
|||
for (int i = 0; i < count; i++) { |
|||
graphics.setColor(randomFontColor()); |
|||
final int x = random.nextInt(width); |
|||
final int y = random.nextInt(height); |
|||
final int w = random.nextInt(width); |
|||
final int h = random.nextInt(height); |
|||
graphics.drawLine(x, y, w, h); |
|||
} |
|||
|
|||
} |
|||
|
|||
private static Color randomFontColor() { |
|||
return randomColor(150, 0); |
|||
} |
|||
|
|||
/** |
|||
* 随机生成背景 |
|||
* @return |
|||
*/ |
|||
private static Color randomBgColor() { |
|||
return randomColor(256, 200); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 随机生成颜色 |
|||
* @param maxValue |
|||
* @param minValue |
|||
* @return |
|||
*/ |
|||
private static Color randomColor(int maxValue, int minValue) { |
|||
Random random = new Random(); |
|||
|
|||
int r = minValue+random.nextInt(maxValue-minValue); |
|||
int g = minValue+random.nextInt(maxValue-minValue); |
|||
int b = minValue+random.nextInt(maxValue-minValue); |
|||
|
|||
Color color = new Color(r, g, b); |
|||
|
|||
return color; |
|||
} |
|||
|
|||
/** |
|||
* 生成验证码,默认长度4 |
|||
* @return |
|||
*/ |
|||
public static String randomCode(){ |
|||
return randomCode(CODE_LENGTH); |
|||
} |
|||
/** |
|||
* 生成字符串 |
|||
* @param codeLength |
|||
* @return |
|||
*/ |
|||
public static String randomCode(int codeLength) { |
|||
|
|||
StringBuilder captcha = new StringBuilder(); |
|||
Random random = new Random(); |
|||
|
|||
for (int i = 0; i < codeLength; i++) { |
|||
int index = random.nextInt(CODES.length());//生成0-字符串长度的数字 |
|||
captcha.append(CODES.charAt(index)); |
|||
} |
|||
|
|||
return captcha.toString(); |
|||
} |
|||
|
|||
} |
@ -1,7 +0,0 @@ |
|||
package com.example.demo.Util; |
|||
|
|||
public class CheckIfNullUtil { |
|||
public static <T> T defaultIfNull(T value, T defaultValue) { |
|||
return value != null ? value : defaultValue; |
|||
} |
|||
} |
@ -1,107 +0,0 @@ |
|||
package com.example.demo.Util; |
|||
|
|||
|
|||
import java.security.*; |
|||
import javax.crypto.*; |
|||
|
|||
public class DESGB { |
|||
private static String strDefaultKey = "testhlsoft"; |
|||
|
|||
private Cipher encryptCipher = null; |
|||
|
|||
private Cipher decryptCipher = null; |
|||
|
|||
public static String byteArr2HexStr(byte[] arrB) throws Exception { |
|||
int iLen = arrB.length; |
|||
|
|||
StringBuffer sb = new StringBuffer(iLen * 2); |
|||
for (int i = 0; i < iLen; i++) { |
|||
int intTmp = arrB[i]; |
|||
|
|||
while (intTmp < 0) { |
|||
intTmp = intTmp + 256; |
|||
} |
|||
|
|||
if (intTmp < 16) { |
|||
sb.append("0"); |
|||
} |
|||
sb.append(Integer.toString(intTmp, 16)); |
|||
} |
|||
return sb.toString(); |
|||
} |
|||
|
|||
public static byte[] hexStr2ByteArr(String strIn) throws Exception { |
|||
byte[] arrB = strIn.getBytes(); |
|||
int iLen = arrB.length; |
|||
|
|||
byte[] arrOut = new byte[iLen / 2]; |
|||
for (int i = 0; i < iLen; i = i + 2) { |
|||
String strTmp = new String(arrB, i, 2); |
|||
arrOut[i / 2] = (byte) Integer.parseInt(strTmp, 16); |
|||
} |
|||
return arrOut; |
|||
} |
|||
|
|||
public DESGB() throws Exception { |
|||
this(strDefaultKey); |
|||
} |
|||
|
|||
public DESGB(String strKey) throws Exception { |
|||
|
|||
Key key = getKey(strKey.getBytes()); |
|||
|
|||
encryptCipher = Cipher.getInstance("DES"); |
|||
encryptCipher.init(Cipher.ENCRYPT_MODE, key); |
|||
|
|||
decryptCipher = Cipher.getInstance("DES"); |
|||
decryptCipher.init(Cipher.DECRYPT_MODE, key); |
|||
} |
|||
|
|||
public byte[] encrypt(byte[] arrB) throws Exception { |
|||
return encryptCipher.doFinal(arrB); |
|||
} |
|||
|
|||
public String encrypt(String strIn) throws Exception { |
|||
return byteArr2HexStr(encrypt(strIn.getBytes())); |
|||
} |
|||
|
|||
public byte[] decrypt(byte[] arrB) throws Exception { |
|||
return decryptCipher.doFinal(arrB); |
|||
} |
|||
|
|||
/** |
|||
* @功能描述: 解决中文乱码问题 |
|||
* @开发人员: 弘历研发部 刘志红 于 2024-1-28上午11:27:38 创建 |
|||
* @参数介绍: @param strIn |
|||
* @参数介绍: @return |
|||
* @参数介绍: @throws Exception |
|||
* @返回数据: String |
|||
* @版本编号: V1.0 |
|||
*/ |
|||
public String decrypt(String strIn) throws Exception { |
|||
return new String(decrypt(hexStr2ByteArr(strIn)),"UTF-8"); |
|||
} |
|||
|
|||
private Key getKey(byte[] arrBTmp) throws Exception { |
|||
|
|||
byte[] arrB = new byte[8]; |
|||
|
|||
for (int i = 0; i < arrBTmp.length && i < arrB.length; i++) { |
|||
arrB[i] = arrBTmp[i]; |
|||
} |
|||
|
|||
Key key = new javax.crypto.spec.SecretKeySpec(arrB, "DES"); |
|||
|
|||
return key; |
|||
} |
|||
|
|||
|
|||
public static void main(String args[]) { |
|||
try { |
|||
DESGB d = new DESGB(); |
|||
System.out.println(d.decrypt("d19f27abb3486c689304600788c604e700abf96d6bd1c9ca")); |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
} |
|||
} |
|||
} |
@ -1,227 +0,0 @@ |
|||
package com.example.demo.Util; |
|||
|
|||
import java.io.BufferedReader; |
|||
import java.io.IOException; |
|||
import java.io.InputStream; |
|||
import java.io.InputStreamReader; |
|||
import java.net.HttpURLConnection; |
|||
import java.net.URL; |
|||
import java.net.URLEncoder; |
|||
import java.security.MessageDigest; |
|||
import java.security.NoSuchAlgorithmException; |
|||
import java.util.ArrayList; |
|||
import java.util.Collections; |
|||
import java.util.List; |
|||
import java.util.Random; |
|||
|
|||
|
|||
|
|||
/** |
|||
* @开发目的: 测试使用 |
|||
* @开发人员: 弘历研发部 刘志红 |
|||
* @开发时间: 2024-1-26下午1:42:18 |
|||
* @软件版本: V1.0 |
|||
*/ |
|||
public class GoldTistV2 { |
|||
|
|||
|
|||
|
|||
|
|||
private static String url = "http://hcm.rzfwq.com/hwhcnewA/"; |
|||
|
|||
|
|||
/** |
|||
* <pre> |
|||
* 发送不带参数的GET的HTTP请求 |
|||
* </pre> |
|||
* |
|||
* @param reqUrl HTTP请求URL |
|||
* @return HTTP响应的字符串 |
|||
*/ |
|||
public static String doGet(String reqUrl) { |
|||
HttpURLConnection url_con = null; |
|||
String responseContent = null; |
|||
try { |
|||
StringBuffer params = new StringBuffer(); |
|||
String queryUrl = reqUrl; |
|||
int paramIndex = reqUrl.indexOf("?"); |
|||
|
|||
if (paramIndex > 0) { |
|||
queryUrl = reqUrl.substring(0, paramIndex); |
|||
String parameters = reqUrl.substring(paramIndex + 1, reqUrl.length()); |
|||
String[] paramArray = parameters.split("&"); |
|||
for (int i = 0; i < paramArray.length; i++) { |
|||
String string = paramArray[i]; |
|||
int index = string.indexOf("="); |
|||
if (index > 0) { |
|||
String parameter = string.substring(0, index); |
|||
String value = string.substring(index + 1, string.length()); |
|||
params.append(parameter); |
|||
params.append("="); |
|||
params.append(URLEncoder.encode(value, "UTF-8")); |
|||
params.append("&"); |
|||
} |
|||
} |
|||
|
|||
params = params.deleteCharAt(params.length() - 1); |
|||
} |
|||
|
|||
URL url = new URL(queryUrl); |
|||
url_con = (HttpURLConnection) url.openConnection(); |
|||
url_con.setRequestMethod("GET"); |
|||
System.setProperty("sun.net.client.defaultConnectTimeout", String.valueOf(500000));// (单位:毫秒)jdk1.4换成这个,连接超时 |
|||
System.setProperty("sun.net.client.defaultReadTimeout", String.valueOf(500000)); // (单位:毫秒)jdk1.4换成这个,读操作超时 |
|||
// url_con.setConnectTimeout(5000);//(单位:毫秒)jdk |
|||
// 1.5换成这个,连接超时 |
|||
// url_con.setReadTimeout(5000);//(单位:毫秒)jdk 1.5换成这个,读操作超时 |
|||
url_con.setDoOutput(true); |
|||
byte[] b = params.toString().getBytes(); |
|||
url_con.getOutputStream().write(b, 0, b.length); |
|||
url_con.getOutputStream().flush(); |
|||
url_con.getOutputStream().close(); |
|||
InputStream in = url_con.getInputStream(); |
|||
BufferedReader rd = new BufferedReader(new InputStreamReader(in, "UTF-8")); |
|||
String tempLine = rd.readLine(); |
|||
StringBuffer temp = new StringBuffer(); |
|||
String crlf = System.getProperty("line.separator"); |
|||
while (tempLine != null) { |
|||
temp.append(tempLine); |
|||
temp.append(crlf); |
|||
tempLine = rd.readLine(); |
|||
} |
|||
responseContent = temp.toString(); |
|||
rd.close(); |
|||
in.close(); |
|||
} |
|||
catch (IOException e) { |
|||
e.printStackTrace(); |
|||
}finally { |
|||
if (url_con != null) { |
|||
url_con.disconnect(); |
|||
} |
|||
} |
|||
return responseContent; |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
/** |
|||
* 生成 MD5 签名 |
|||
* |
|||
* @param params 待签名的参数数组 |
|||
* @param secretKey 密钥 |
|||
* @return 签名的 MD5 哈希值,若出现异常则返回 null |
|||
*/ |
|||
public static String generateSignature(String[] params, String secretKey) { |
|||
// 将参数数组转换为列表,以便进行排序 |
|||
List<String> paramList = new ArrayList<String>(); |
|||
Collections.addAll(paramList, params); |
|||
// 对参数列表进行排序 |
|||
Collections.sort(paramList); |
|||
|
|||
// 拼接排序后的参数 |
|||
StringBuilder paramString = new StringBuilder(); |
|||
for (String param : paramList) { |
|||
paramString.append(param); |
|||
} |
|||
|
|||
// 拼接密钥 |
|||
paramString.append(secretKey); |
|||
|
|||
try { |
|||
// 获取 MD5 消息摘要实例 |
|||
MessageDigest md = MessageDigest.getInstance("MD5"); |
|||
// 计算摘要,明确指定字符编码为 UTF-8 |
|||
byte[] digest = md.digest(paramString.toString().getBytes("UTF-8")); |
|||
// 将字节数组转换为十六进制字符串 |
|||
StringBuilder hexString = new StringBuilder(); |
|||
for (byte b : digest) { |
|||
String hex = Integer.toHexString(0xFF & b); |
|||
if (hex.length() == 1) { |
|||
hexString.append('0'); |
|||
} |
|||
hexString.append(hex); |
|||
} |
|||
return hexString.toString(); |
|||
} catch (NoSuchAlgorithmException e) { |
|||
e.printStackTrace(); |
|||
return null; |
|||
} catch (java.io.UnsupportedEncodingException e) { |
|||
e.printStackTrace(); |
|||
return null; |
|||
} |
|||
} |
|||
/** |
|||
* @功能描述: 生成随机数 |
|||
* @开发人员: 弘历研发部 刘志红 于 2024-1-25下午5:45:36 创建 |
|||
* @参数介绍: @param len |
|||
* @参数介绍: @return |
|||
* @返回数据: String |
|||
* @版本编号: V1.0 |
|||
*/ |
|||
public static String RandomUid(int len){ |
|||
String characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghjklmnpqrstuvwxyz23456789"; |
|||
StringBuilder result = new StringBuilder(); |
|||
Random rnd = new Random(); |
|||
int strlen = characters.length(); |
|||
while (result.length() < 8) { // length of the random string. |
|||
int index = (int) (rnd.nextFloat() * strlen); |
|||
result.append(characters.charAt(index)); |
|||
} |
|||
return "JB"+result.toString(); |
|||
} |
|||
|
|||
/** |
|||
* 类型说明: |
|||
* |
|||
55 免费金币 金币系统退商品 |
|||
56 永久金币 金币系统退商品 |
|||
57 任务金币 金币系统退商品 |
|||
58 免费金币 金币系统退金币 |
|||
59 任务金币 金币系统退金币 |
|||
* @功能描述: 金币平台更新客户金币 |
|||
* @开发人员: 弘历研发部 刘志红 于 2025-3-21下午1:58:13 创建 |
|||
* @参数介绍: @param jwcode 账号 |
|||
* @参数介绍: @param lx 类型 |
|||
* @参数介绍: @param jbs 金币数量 |
|||
* @参数介绍: @param remark 备注 |
|||
* @参数介绍: @param yjjb 永久金币 |
|||
* @参数介绍: @param czr 操作人 |
|||
* @参数介绍: @param goodsname 商品名称 |
|||
* @参数介绍: @return |
|||
* @返回数据: String 返回状态1加成功2减成功其他失败 -5 金币不足 -6 类型错误 -7签名错误 |
|||
* @版本编号: V1.0 |
|||
*/ |
|||
public static String addCoinNew(String jwcode, int lx, double jbs, |
|||
String remark,double yjjb,String czr,String goodsname){ |
|||
//查错误使用 |
|||
String sjzfc = RandomUid(10); |
|||
String resp = ""; |
|||
try { |
|||
DESGB desjbkc = new DESGB("Jbxt.205"); |
|||
String sk = "jwcode="+jwcode+"&number="+jbs+"&uid="+sjzfc+"&remark="+ |
|||
remark+"&czr="+czr+"&yjjb="+yjjb+"&czpt=4&goodsname="+goodsname+"&type="+lx; |
|||
System.out.println("签名前:"+sk); |
|||
String sign = generateSignature(sk.split("&"),"222251821eba7efab6d48e388b8f6baa"); |
|||
sk = desjbkc.encrypt(new String(sk.getBytes(), "UTF-8")); |
|||
System.out.println(url+"goldUpdate_sign.gold?app=4&sk="+sk+"&sign="+sign); |
|||
resp = doGet(url+"goldUpdate_sign.gold?app=4&sk="+sk+"&sign="+sign); |
|||
}catch (Exception e){ |
|||
System.out.println("加金币异常"+e.toString()); |
|||
} |
|||
System.out.println(resp); |
|||
return resp; |
|||
} |
|||
|
|||
|
|||
|
|||
public static void main(String[] args) throws Exception { |
|||
//调用demo |
|||
addCoinNew("94226013",64,1,"充1金币测试",0,"黄其振 ","文章11"); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -1,195 +0,0 @@ |
|||
package com.example.demo.Util; |
|||
|
|||
|
|||
import com.fasterxml.jackson.core.JsonProcessingException; |
|||
import com.fasterxml.jackson.databind.ObjectMapper; |
|||
import io.jsonwebtoken.Claims; |
|||
import io.jsonwebtoken.JwtBuilder; |
|||
import io.jsonwebtoken.Jwts; |
|||
import io.jsonwebtoken.SignatureAlgorithm; |
|||
|
|||
import org.springframework.security.core.userdetails.UserDetails; |
|||
|
|||
|
|||
import javax.crypto.SecretKey; |
|||
import javax.crypto.spec.SecretKeySpec; |
|||
import java.util.Base64; |
|||
import java.util.Date; |
|||
import java.util.UUID; |
|||
|
|||
/** |
|||
* JWT的工具类 |
|||
*/ |
|||
public class JWTUtil { |
|||
|
|||
//有效期为 |
|||
public static final Long JWT_TTL = 24*60 * 60 *1000L;// 60 * 60 *1000 一个小时 |
|||
|
|||
//设置 密钥 |
|||
public static final String JWT_KEY = "bobzyh"; |
|||
|
|||
public static String getUUID(){ |
|||
String token = UUID.randomUUID().toString().replaceAll("-", ""); |
|||
return token; |
|||
} |
|||
|
|||
/** |
|||
* 用户信息创建JWT,默认有效期30分钟 |
|||
* @param user |
|||
* @return |
|||
*/ |
|||
|
|||
public static String createJWT(UserDetails user) { |
|||
ObjectMapper mapper = new ObjectMapper(); |
|||
try { |
|||
String json = mapper.writeValueAsString(user); |
|||
System.out.println("用户的JSON"); |
|||
System.out.println(json); |
|||
return createJWT(json, JWT_TTL); |
|||
} catch (JsonProcessingException e) { |
|||
throw new RuntimeException(e); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 用户信息创建JWT, 指定有效期,单位秒 |
|||
* @param user |
|||
* @param ttlMillis |
|||
* @return |
|||
*/ |
|||
public static String createJWT(UserDetails user, Long ttlMillis) { |
|||
ObjectMapper mapper = new ObjectMapper(); |
|||
try { |
|||
String json = mapper.writeValueAsString(user); |
|||
return createJWT(json, ttlMillis); |
|||
} catch (JsonProcessingException e) { |
|||
throw new RuntimeException(e); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 生成jtw |
|||
* @param subject token中要存放的数据(json格式) |
|||
* @return |
|||
*/ |
|||
public static String createJWT(String subject) { |
|||
JwtBuilder builder = getJwtBuilder(subject, 30*60*1000L, getUUID());// 设置过期时间 |
|||
return builder.compact(); |
|||
} |
|||
|
|||
/** |
|||
* 生成jtw |
|||
* @param subject token中要存放的数据(json格式) |
|||
* @param ttlMillis token超时时间 |
|||
* @return |
|||
*/ |
|||
public static String createJWT(String subject, Long ttlMillis) { |
|||
JwtBuilder builder = getJwtBuilder(subject, ttlMillis, getUUID());// 设置过期时间 |
|||
return builder.compact(); |
|||
} |
|||
|
|||
private static JwtBuilder getJwtBuilder(String subject, Long ttlMillis, String uuid) { |
|||
SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256; //加密算法 |
|||
SecretKey secretKey = generalKey(); //密钥 |
|||
long nowMillis = System.currentTimeMillis(); //当前时间 |
|||
Date now = new Date(nowMillis); |
|||
if(ttlMillis==null){ |
|||
ttlMillis= JWTUtil.JWT_TTL; |
|||
} |
|||
long expMillis = nowMillis + ttlMillis; |
|||
Date expDate = new Date(expMillis); //过期时间 |
|||
return Jwts.builder() |
|||
.setId(uuid) //唯一的ID |
|||
.setSubject(subject) // 主题 可以是JSON数据 |
|||
.setIssuer("sg") // 签发者 |
|||
.setIssuedAt(now) // 签发时间 |
|||
.signWith(signatureAlgorithm, secretKey) //使用HS256对称加密算法签名, 第二个参数为秘钥 |
|||
.setExpiration(expDate); |
|||
} |
|||
|
|||
/** |
|||
* 创建token |
|||
* @param id |
|||
* @param subject |
|||
* @param ttlMillis |
|||
* @return |
|||
*/ |
|||
public static String createJWT(String id, String subject, Long ttlMillis) { |
|||
JwtBuilder builder = getJwtBuilder(subject, ttlMillis, id);// 设置过期时间 |
|||
return builder.compact(); |
|||
} |
|||
|
|||
/** |
|||
* 生成加密后的秘钥 secretKey |
|||
* @return |
|||
*/ |
|||
public static SecretKey generalKey() { |
|||
byte[] encodedKey = Base64.getDecoder().decode(JWTUtil.JWT_KEY); |
|||
SecretKey key = new SecretKeySpec(encodedKey, 0, encodedKey.length, "AES"); |
|||
return key; |
|||
} |
|||
|
|||
/** |
|||
* 解析 |
|||
* |
|||
* @param jwt |
|||
* @return |
|||
* @throws Exception |
|||
*/ |
|||
public static Claims parseJWT(String jwt) throws Exception { |
|||
SecretKey secretKey = generalKey(); |
|||
System.out.println(jwt); |
|||
return Jwts.parser() |
|||
.setSigningKey(secretKey) |
|||
.parseClaimsJws(jwt) |
|||
.getBody(); |
|||
} |
|||
|
|||
/** |
|||
* 解析为用户 |
|||
* @param jwt |
|||
* @return |
|||
* @throws Exception |
|||
*/ |
|||
public static UserDetails getUserDetails(String jwt, Class<? extends UserDetails> cls) throws Exception { |
|||
Claims claims = JWTUtil.parseJWT(jwt); |
|||
String json = claims.getSubject(); |
|||
ObjectMapper mapper = new ObjectMapper(); |
|||
UserDetails user = null; |
|||
user = mapper.readValue(json, cls); |
|||
|
|||
return user; |
|||
} |
|||
|
|||
public static UserDetails getUserDetailsList(String jwt, Class<? extends UserDetails> ...cls) throws Exception { |
|||
Claims claims = JWTUtil.parseJWT(jwt); |
|||
String json = claims.getSubject(); |
|||
ObjectMapper mapper = new ObjectMapper(); |
|||
if (cls != null && cls.length > 0) { |
|||
for (Class<? extends UserDetails> cl : cls) { |
|||
try { |
|||
UserDetails user = mapper.readValue(json, cl); |
|||
return user; |
|||
} catch (JsonProcessingException e) { |
|||
e.printStackTrace(); |
|||
} |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
|
|||
// public static void main(String[] args) throws Exception { |
|||
// |
|||
// // 加密 |
|||
// String jwt = createJWT("2123"); |
|||
// System.out.println(jwt); |
|||
// |
|||
// // 解密 |
|||
// Claims claims = parseJWT("eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI2Y2QzZGU0NWRiN2I0MjVlOWJlZTAzYzUyNjY2ODhhYiIsInN1YiI6IjIxMjMiLCJpc3MiOiJzZyIsImlhdCI6MTcxMDgzMTc4NCwiZXhwIjoxNzEwODM1Mzg0fQ.k6RPyIvKX-mrS26YbyaDNVLlihGqTQDeLj2gsrNokCk"); |
|||
// String subject = claims.getSubject(); |
|||
// System.out.println(subject); |
|||
// |
|||
// } |
|||
|
|||
} |
@ -1,39 +0,0 @@ |
|||
package com.example.demo.Util; |
|||
|
|||
import java.security.MessageDigest; |
|||
import java.util.Base64; |
|||
import java.util.Base64.Encoder; |
|||
|
|||
public class MD5Util { |
|||
// MD5双重加密 使用salt |
|||
public static String getDBMD5(String str, String salt){ |
|||
return getMD5(getMD5(str)+salt); |
|||
} |
|||
|
|||
// MD5加密 |
|||
public static String getMD5(String str) { |
|||
|
|||
String newstr = null; |
|||
try { |
|||
//确定计算方法 |
|||
MessageDigest md5=MessageDigest.getInstance("MD5"); |
|||
|
|||
//加密后的字符串 |
|||
newstr=encryptBASE64(md5.digest(str.getBytes("utf-8"))); |
|||
|
|||
} catch (Exception e) { |
|||
// TODO: handle exception |
|||
} |
|||
|
|||
return newstr; |
|||
} |
|||
|
|||
private static String encryptBASE64(byte[] data) { |
|||
// BASE64Encoder encoder = new BASE64Encoder(); |
|||
// String encode = encoder.encode(data); |
|||
// 从JKD 9开始rt.jar包已废除,从JDK 1.8开始使用java.util.Base64.Encoder |
|||
Encoder encoder = Base64.getEncoder(); |
|||
String encode = encoder.encodeToString(data); |
|||
return encode; |
|||
} |
|||
} |
@ -1,27 +0,0 @@ |
|||
package com.example.demo.Util; |
|||
|
|||
import jakarta.servlet.*; |
|||
import jakarta.servlet.http.HttpServletRequest; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
|
|||
import java.io.IOException; |
|||
|
|||
//替换HttpServletRequest |
|||
@Slf4j |
|||
public class ReplaceStreamFilter implements Filter { |
|||
@Override |
|||
public void init(FilterConfig filterConfig) throws ServletException { |
|||
log.info("StreamFilter初始化..."); |
|||
} |
|||
|
|||
@Override |
|||
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { |
|||
ServletRequest requestWrapper = new RequestWrapper((HttpServletRequest) request); |
|||
chain.doFilter(requestWrapper, response); |
|||
} |
|||
|
|||
@Override |
|||
public void destroy() { |
|||
log.info("StreamFilter销毁..."); |
|||
} |
|||
} |
@ -1,123 +0,0 @@ |
|||
package com.example.demo.Util; |
|||
|
|||
import jakarta.servlet.ReadListener; |
|||
import jakarta.servlet.ServletInputStream; |
|||
import jakarta.servlet.ServletRequest; |
|||
import jakarta.servlet.http.HttpServletRequest; |
|||
import jakarta.servlet.http.HttpServletRequestWrapper; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
|
|||
|
|||
import java.io.*; |
|||
import java.nio.charset.Charset; |
|||
|
|||
|
|||
//包装HttpServletRequest,目的是让其输入流可重复读 |
|||
@Slf4j |
|||
public class RequestWrapper extends HttpServletRequestWrapper { |
|||
/** |
|||
* 存储body数据的容器 |
|||
*/ |
|||
private final byte[] body; |
|||
|
|||
public RequestWrapper(HttpServletRequest request) throws IOException { |
|||
super(request); |
|||
|
|||
// 将body数据存储起来 |
|||
String bodyStr = getBodyString(request); |
|||
body = bodyStr.getBytes(Charset.defaultCharset()); |
|||
|
|||
|
|||
|
|||
} |
|||
|
|||
/** |
|||
* 获取请求Body |
|||
* |
|||
* @param request request |
|||
* @return String |
|||
*/ |
|||
public String getBodyString(final ServletRequest request) { |
|||
try { |
|||
return inputStream2String(request.getInputStream()); |
|||
} catch (IOException e) { |
|||
log.error("", e); |
|||
throw new RuntimeException(e); |
|||
} |
|||
} |
|||
|
|||
/** |
|||
* 获取请求Body |
|||
* |
|||
* @return String |
|||
*/ |
|||
public String getBodyString() { |
|||
final InputStream inputStream = new ByteArrayInputStream(body); |
|||
|
|||
return inputStream2String(inputStream); |
|||
} |
|||
|
|||
/** |
|||
* 将inputStream里的数据读取出来并转换成字符串 |
|||
* |
|||
* @param inputStream inputStream |
|||
* @return String |
|||
*/ |
|||
private String inputStream2String(InputStream inputStream) { |
|||
StringBuilder sb = new StringBuilder(); |
|||
BufferedReader reader = null; |
|||
|
|||
try { |
|||
reader = new BufferedReader(new InputStreamReader(inputStream, Charset.defaultCharset())); |
|||
String line; |
|||
while ((line = reader.readLine()) != null) { |
|||
sb.append(line); |
|||
} |
|||
} catch (IOException e) { |
|||
log.error("", e); |
|||
throw new RuntimeException(e); |
|||
} finally { |
|||
if (reader != null) { |
|||
try { |
|||
reader.close(); |
|||
} catch (IOException e) { |
|||
log.error("", e); |
|||
} |
|||
} |
|||
} |
|||
|
|||
return sb.toString(); |
|||
} |
|||
|
|||
@Override |
|||
public BufferedReader getReader() throws IOException { |
|||
return new BufferedReader(new InputStreamReader(getInputStream())); |
|||
} |
|||
|
|||
@Override |
|||
public ServletInputStream getInputStream() throws IOException { |
|||
|
|||
final ByteArrayInputStream inputStream = new ByteArrayInputStream(body); |
|||
|
|||
return new ServletInputStream() { |
|||
@Override |
|||
public int read() throws IOException { |
|||
return inputStream.read(); |
|||
} |
|||
|
|||
@Override |
|||
public boolean isFinished() { |
|||
return false; |
|||
} |
|||
|
|||
@Override |
|||
public boolean isReady() { |
|||
return false; |
|||
} |
|||
|
|||
@Override |
|||
public void setReadListener(ReadListener readListener) { |
|||
} |
|||
}; |
|||
} |
|||
} |
@ -1,39 +0,0 @@ |
|||
package com.example.demo.Util; |
|||
|
|||
import com.example.demo.domain.entity.*; |
|||
import com.example.demo.domain.vo.*; |
|||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
|||
import com.fasterxml.jackson.annotation.JsonProperty; |
|||
import lombok.Data; |
|||
import lombok.Getter; |
|||
import lombok.NoArgsConstructor; |
|||
import lombok.Setter; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@JsonIgnoreProperties(ignoreUnknown = true) |
|||
public class TokenPayload { |
|||
@JsonProperty("token") |
|||
private String token; |
|||
private String jwcode; |
|||
private String password; |
|||
private String pageNum; |
|||
private String pageSize; |
|||
private Activity activity; |
|||
private User user; |
|||
private Admin admin; |
|||
private Detail detail; |
|||
private Product product; |
|||
private Audit audit; |
|||
private Rate rate; |
|||
private Recharge recharge; |
|||
private ConsumeDetail consumeDetail; |
|||
private DetailVo detailVo; |
|||
private RechargeVo rechargeVo; |
|||
private Statistics statistics; |
|||
private Statisticss statisticss; |
|||
private SumCoin sumCoin; |
|||
private UserVo userVo; |
|||
|
|||
} |
|||
|
@ -1,54 +0,0 @@ |
|||
package com.example.demo.Util; |
|||
|
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import java.io.*; |
|||
import java.util.UUID; |
|||
|
|||
public class UploadUtil { |
|||
|
|||
/** |
|||
* 将文件保存到指定路径 |
|||
* @return |
|||
*/ |
|||
public static String save(MultipartFile file, String path) { |
|||
|
|||
// 验证文件是不是传了 |
|||
if (file.getSize() <= 0) { |
|||
return null; |
|||
} |
|||
|
|||
// 验证文件夹是否存在 |
|||
File pathFile = new File(path); |
|||
if (!pathFile.exists()) { |
|||
// 创建 |
|||
if (!pathFile.mkdirs()) { |
|||
return null; |
|||
} |
|||
} |
|||
|
|||
// 生UUID作为新的文件名 |
|||
String fileName = UUID.randomUUID().toString(); |
|||
String oldName = file.getOriginalFilename(); |
|||
|
|||
if (oldName.lastIndexOf(".")>=0) { |
|||
String suffix = oldName.substring(oldName.lastIndexOf(".")); |
|||
fileName += suffix; |
|||
} |
|||
|
|||
// 创建一个文件流 |
|||
try (OutputStream out = new FileOutputStream(path + fileName) ){ |
|||
// 把上传的文件,写到这个流里面 |
|||
out.write(file.getBytes()); |
|||
|
|||
// 写成功了 |
|||
return fileName; |
|||
} catch (FileNotFoundException e) { |
|||
e.printStackTrace(); |
|||
} catch (IOException e1) { |
|||
e1.printStackTrace(); |
|||
} |
|||
|
|||
return null; |
|||
} |
|||
} |
@ -1,14 +0,0 @@ |
|||
package com.example.demo.config; |
|||
|
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.context.annotation.Configuration; |
|||
import org.springframework.web.client.RestTemplate; |
|||
|
|||
@Configuration |
|||
public class AppConfig { |
|||
|
|||
@Bean |
|||
public RestTemplate restTemplate() { |
|||
return new RestTemplate(); |
|||
} |
|||
} |
@ -1,33 +0,0 @@ |
|||
package com.example.demo.config; |
|||
|
|||
import org.springframework.cache.CacheManager; |
|||
import org.springframework.cache.annotation.EnableCaching; |
|||
import org.springframework.cache.concurrent.ConcurrentMapCache; |
|||
import org.springframework.cache.support.SimpleCacheManager; |
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.context.annotation.Configuration; |
|||
import org.springframework.data.redis.cache.RedisCacheConfiguration; |
|||
import org.springframework.data.redis.cache.RedisCacheManager; |
|||
import org.springframework.data.redis.connection.RedisConnectionFactory; |
|||
|
|||
import java.time.Duration; |
|||
import java.util.Arrays; |
|||
|
|||
@Configuration |
|||
@EnableCaching |
|||
public class CacheConfig { |
|||
|
|||
@Bean |
|||
public CacheManager cacheManager(RedisConnectionFactory redisConnectionFactory) { |
|||
RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig() |
|||
.entryTtl(Duration.ofHours(1)) // 设置默认过期时间为 1 小时 |
|||
.disableCachingNullValues(); // 禁用空值缓存 |
|||
|
|||
return RedisCacheManager.builder(redisConnectionFactory) |
|||
.cacheDefaults(config) |
|||
.withCacheConfiguration("statistics", config) // 注册缓存名称 |
|||
.withCacheConfiguration("recharge", config) // 注册缓存名称 |
|||
.withCacheConfiguration("consume", config) // 注册缓存名称 |
|||
.build(); |
|||
} |
|||
} |
@ -1,50 +0,0 @@ |
|||
//package com.example.demo.config; |
|||
// |
|||
//import com.zaxxer.hikari.HikariDataSource; |
|||
//import org.apache.ibatis.session.SqlSessionFactory; |
|||
//import org.mybatis.spring.SqlSessionTemplate; |
|||
//import org.mybatis.spring.SqlSessionFactoryBean; // 正确导入SqlSessionFactoryBean |
|||
//import org.mybatis.spring.annotation.MapperScan; |
|||
//import org.springframework.beans.factory.annotation.Qualifier; |
|||
//import org.springframework.boot.context.properties.ConfigurationProperties; |
|||
//import org.springframework.boot.jdbc.DataSourceBuilder; |
|||
//import org.springframework.context.annotation.Bean; |
|||
//import org.springframework.context.annotation.Configuration; |
|||
//import org.springframework.context.annotation.Primary; |
|||
//import org.springframework.core.io.support.PathMatchingResourcePatternResolver; |
|||
// |
|||
//import javax.sql.DataSource; |
|||
// |
|||
// |
|||
// |
|||
///** |
|||
// * 数据库leadnews_article配置 |
|||
// */ |
|||
//@Configuration |
|||
//@MapperScan(basePackages = {"com.example.demo.mapper"}, sqlSessionFactoryRef = "sqlSessionFactoryArticle") |
|||
//public class DBSrcArticle { |
|||
// |
|||
// @Bean(name = "mysql1DataSource") |
|||
// @Primary // 因为这是默认数据源,因此标记为Primary |
|||
// @ConfigurationProperties(prefix = "spring.datasource.mysql1") |
|||
// public DataSource cmsDataSource() { |
|||
// HikariDataSource dataSource = DataSourceBuilder.create().type(HikariDataSource.class).build(); |
|||
//// log.info("mysql1 DataSource initialized with pool-name: {}", dataSource.getPoolName()); |
|||
// return dataSource; |
|||
// } |
|||
// |
|||
// @Bean(name = "mysql1SqlSessionFactory") |
|||
// @Primary // 默认SqlSessionFactory |
|||
// public SqlSessionFactory cmsSqlSessionFactory(@Qualifier("mysql1DataSource") DataSource dataSource) throws Exception { |
|||
// SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); |
|||
// sessionFactory.setDataSource(dataSource); |
|||
// sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath:mapper/*.xml")); |
|||
// return sessionFactory.getObject(); |
|||
// } |
|||
// |
|||
// @Bean(name = "mysql1SqlSessionTemplate") |
|||
// @Primary // 默认SqlSessionTemplate |
|||
// public SqlSessionTemplate cmsSqlSessionTemplate(@Qualifier("mysql1SqlSessionFactory") SqlSessionFactory sqlSessionFactory) { |
|||
// return new SqlSessionTemplate(sqlSessionFactory); |
|||
// } |
|||
//} |
@ -1,28 +0,0 @@ |
|||
package com.example.demo.config; |
|||
|
|||
|
|||
//import com.example.demo.config.LocalDateTimeSerializer; |
|||
//import com.example.demo.config.LocalDateTimeDeserializer; |
|||
import com.fasterxml.jackson.databind.ObjectMapper; |
|||
import com.fasterxml.jackson.databind.module.SimpleModule; |
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.context.annotation.Configuration; |
|||
|
|||
import java.time.LocalDateTime; |
|||
|
|||
|
|||
@Configuration |
|||
public class JacksonConfig { |
|||
|
|||
@Bean |
|||
public ObjectMapper objectMapper() { |
|||
SimpleModule module = new SimpleModule(); |
|||
module.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer()); |
|||
module.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer()); |
|||
|
|||
ObjectMapper mapper = new ObjectMapper(); |
|||
mapper.registerModule(module); |
|||
|
|||
return mapper; |
|||
} |
|||
} |
@ -1,28 +0,0 @@ |
|||
package com.example.demo.config; |
|||
|
|||
|
|||
|
|||
import com.fasterxml.jackson.core.JsonParser; |
|||
import com.fasterxml.jackson.databind.DeserializationContext; |
|||
import com.fasterxml.jackson.databind.deser.std.StdDeserializer; |
|||
import java.io.IOException; |
|||
import java.time.LocalDateTime; |
|||
import java.time.format.DateTimeFormatter; |
|||
|
|||
public class LocalDateTimeDeserializer extends StdDeserializer<LocalDateTime> { |
|||
|
|||
private static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
|||
|
|||
public LocalDateTimeDeserializer() { |
|||
this(null); |
|||
} |
|||
|
|||
public LocalDateTimeDeserializer(Class<?> vc) { |
|||
super(vc); |
|||
} |
|||
|
|||
@Override |
|||
public LocalDateTime deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { |
|||
return LocalDateTime.parse(p.getValueAsString(), formatter); |
|||
} |
|||
} |
@ -1,27 +0,0 @@ |
|||
package com.example.demo.config; |
|||
|
|||
|
|||
import com.fasterxml.jackson.core.JsonGenerator; |
|||
import com.fasterxml.jackson.databind.SerializerProvider; |
|||
import com.fasterxml.jackson.databind.ser.std.StdSerializer; |
|||
import java.io.IOException; |
|||
import java.time.LocalDateTime; |
|||
import java.time.format.DateTimeFormatter; |
|||
|
|||
public class LocalDateTimeSerializer extends StdSerializer<LocalDateTime> { |
|||
|
|||
private static final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
|||
|
|||
public LocalDateTimeSerializer() { |
|||
this(null); |
|||
} |
|||
|
|||
public LocalDateTimeSerializer(Class<LocalDateTime> t) { |
|||
super(t); |
|||
} |
|||
|
|||
@Override |
|||
public void serialize(LocalDateTime value, JsonGenerator gen, SerializerProvider provider) throws IOException { |
|||
gen.writeString(value.format(formatter)); |
|||
} |
|||
} |
@ -1,62 +0,0 @@ |
|||
package com.example.demo.config; |
|||
|
|||
import com.zaxxer.hikari.HikariDataSource; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.ibatis.session.SqlSessionFactory; |
|||
import org.mybatis.spring.SqlSessionFactoryBean; |
|||
import org.mybatis.spring.SqlSessionTemplate; |
|||
import org.springframework.beans.factory.annotation.Qualifier; |
|||
import org.springframework.boot.context.properties.ConfigurationProperties; |
|||
import org.springframework.boot.jdbc.DataSourceBuilder; |
|||
import org.springframework.context.annotation.Bean; |
|||
|
|||
import org.springframework.context.annotation.Configuration; |
|||
import org.springframework.context.annotation.Primary; |
|||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver; |
|||
|
|||
import javax.sql.DataSource; |
|||
|
|||
@Slf4j |
|||
@Configuration |
|||
public class Mysql1DataSourceConfig { |
|||
|
|||
// @Bean(name = "mysql1DataSource") |
|||
//// @Primary |
|||
// public DataSource mysql1DataSource() { |
|||
// HikariDataSource dataSource = new HikariDataSource(); |
|||
// dataSource.setJdbcUrl("jdbc:mysql://54.251.137.151:10701/hwgold?serverTimezone=Asia/Shanghai&useSSL=false&useUnicode=true&characterEncoding=UTF-8"); |
|||
// dataSource.setUsername("hwgold"); |
|||
// dataSource.setPassword("AGX4Z3YMxiCG3GR2"); |
|||
// dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver"); |
|||
// dataSource.setMaximumPoolSize(10); |
|||
// dataSource.setPoolName("mysql1HikariCP"); |
|||
// log.info("mysql1 DataSource initialized with pool-name: {}", dataSource.getPoolName()); |
|||
// return dataSource; |
|||
// } |
|||
@Bean(name = "mysql1DataSource") |
|||
@ConfigurationProperties(prefix = "spring.datasource.mysql1") |
|||
public DataSource mysql2DataSource() { |
|||
return DataSourceBuilder.create().type(HikariDataSource.class).build(); |
|||
} |
|||
@Bean(name = "mysql1SqlSessionFactory") |
|||
// @Primary |
|||
public SqlSessionFactory mysql1SqlSessionFactory(@Qualifier("mysql1DataSource") DataSource dataSource, |
|||
@Qualifier("globalConfiguration1") org.apache.ibatis.session.Configuration globalConfiguration1) throws Exception { |
|||
SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); |
|||
sessionFactory.setDataSource(dataSource); |
|||
sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath:mapper/*.xml")); |
|||
sessionFactory.setConfiguration(globalConfiguration1); |
|||
return sessionFactory.getObject(); |
|||
} |
|||
|
|||
@Bean(name = "mysql1SqlSessionTemplate") |
|||
// @Primary |
|||
public SqlSessionTemplate mysql1SqlSessionTemplate(@Qualifier("mysql1SqlSessionFactory") SqlSessionFactory sqlSessionFactory) { |
|||
return new SqlSessionTemplate(sqlSessionFactory); |
|||
} |
|||
@Bean |
|||
@ConfigurationProperties(prefix = "mybatis.configuration.mysql1") |
|||
public org.apache.ibatis.session.Configuration globalConfiguration1() { |
|||
return new org.apache.ibatis.session.Configuration(); |
|||
} |
|||
} |
@ -1,60 +0,0 @@ |
|||
package com.example.demo.config; |
|||
|
|||
import com.zaxxer.hikari.HikariDataSource; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.ibatis.session.SqlSessionFactory; |
|||
import org.mybatis.spring.SqlSessionFactoryBean; |
|||
import org.mybatis.spring.SqlSessionTemplate; |
|||
import org.springframework.beans.factory.annotation.Qualifier; |
|||
import org.springframework.boot.context.properties.ConfigurationProperties; |
|||
import org.springframework.boot.jdbc.DataSourceBuilder; |
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.context.annotation.Configuration; |
|||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver; |
|||
|
|||
import javax.sql.DataSource; |
|||
|
|||
@Slf4j |
|||
@Configuration |
|||
public class Mysql2DataSourceConfig { |
|||
|
|||
// @Bean(name = "mysql2DataSource") |
|||
// public DataSource mysql2DataSource() { |
|||
// HikariDataSource dataSource = new HikariDataSource(); |
|||
// dataSource.setJdbcUrl("jdbc:mysql://39.101.133.168:3306/hwgold?serverTimezone=Asia/Shanghai&useSSL=false&useUnicode=true&characterEncoding=UTF-8"); |
|||
// dataSource.setUsername("hljw"); |
|||
// dataSource.setPassword("5dmWCCKfEk3TTeyn"); |
|||
// dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver"); |
|||
// dataSource.setMaximumPoolSize(10); |
|||
// dataSource.setPoolName("mysql2HikariCP"); |
|||
// log.info("mysql2 DataSource initialized with pool-name: {}", dataSource.getPoolName()); |
|||
// return dataSource; |
|||
// } |
|||
|
|||
// 定义名为 "spring.datasource.mysql2" 的 DataSource Bean |
|||
@Bean(name = "mysql2DataSource") |
|||
@ConfigurationProperties(prefix = "spring.datasource.mysql2") |
|||
public DataSource mysql2DataSource() { |
|||
return DataSourceBuilder.create().type(HikariDataSource.class).build(); |
|||
} |
|||
@Bean(name = "mysql2SqlSessionFactory") |
|||
public SqlSessionFactory mysql2SqlSessionFactory(@Qualifier("mysql2DataSource") DataSource dataSource, |
|||
@Qualifier("globalConfiguration2") org.apache.ibatis.session.Configuration globalConfiguration2) throws Exception { |
|||
SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); |
|||
sessionFactory.setDataSource(dataSource); |
|||
sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath:mapperLink/*.xml")); |
|||
sessionFactory.setConfiguration(globalConfiguration2); |
|||
return sessionFactory.getObject(); |
|||
} |
|||
|
|||
@Bean(name = "mysql2SqlSessionTemplate") |
|||
public SqlSessionTemplate mysql2SqlSessionTemplate(@Qualifier("mysql2SqlSessionFactory") SqlSessionFactory sqlSessionFactory) { |
|||
return new SqlSessionTemplate(sqlSessionFactory); |
|||
} |
|||
@Bean |
|||
@ConfigurationProperties(prefix = "mybatis.configuration.mysql2") |
|||
public org.apache.ibatis.session.Configuration globalConfiguration2() { |
|||
return new org.apache.ibatis.session.Configuration(); |
|||
} |
|||
|
|||
} |
@ -1,46 +0,0 @@ |
|||
package com.example.demo.config; |
|||
|
|||
import com.zaxxer.hikari.HikariDataSource; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.ibatis.session.SqlSessionFactory; |
|||
import org.mybatis.spring.SqlSessionFactoryBean; |
|||
import org.mybatis.spring.SqlSessionTemplate; |
|||
import org.springframework.beans.factory.annotation.Qualifier; |
|||
import org.springframework.boot.context.properties.ConfigurationProperties; |
|||
import org.springframework.boot.jdbc.DataSourceBuilder; |
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.context.annotation.Configuration; |
|||
import org.springframework.core.io.support.PathMatchingResourcePatternResolver; |
|||
|
|||
import javax.sql.DataSource; |
|||
|
|||
@Slf4j |
|||
@Configuration |
|||
public class Mysql3DataSourceConfig { |
|||
|
|||
@Bean(name = "mysql3DataSource") |
|||
@ConfigurationProperties(prefix = "spring.datasource.mysql3") |
|||
public DataSource mysql3DataSource() { |
|||
return DataSourceBuilder.create().type(HikariDataSource.class).build(); |
|||
} |
|||
@Bean(name = "mysql3SqlSessionFactory") |
|||
public SqlSessionFactory mysql3SqlSessionFactory(@Qualifier("mysql3DataSource") DataSource dataSource, |
|||
@Qualifier("globalConfiguration3") org.apache.ibatis.session.Configuration globalConfiguration3) throws Exception { |
|||
SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); |
|||
sessionFactory.setDataSource(dataSource); |
|||
sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath:mapperPay/*.xml")); |
|||
sessionFactory.setConfiguration(globalConfiguration3); |
|||
return sessionFactory.getObject(); |
|||
} |
|||
|
|||
@Bean(name = "mysql3SqlSessionTemplate") |
|||
public SqlSessionTemplate mysql3SqlSessionTemplate(@Qualifier("mysql3SqlSessionFactory") SqlSessionFactory sqlSessionFactory) { |
|||
return new SqlSessionTemplate(sqlSessionFactory); |
|||
} |
|||
@Bean |
|||
@ConfigurationProperties(prefix = "mybatis.configuration.mysql3") |
|||
public org.apache.ibatis.session.Configuration globalConfiguration3() { |
|||
return new org.apache.ibatis.session.Configuration(); |
|||
} |
|||
|
|||
} |
@ -1,46 +0,0 @@ |
|||
package com.example.demo.config; |
|||
|
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.boot.autoconfigure.cache.CacheProperties; |
|||
import org.springframework.boot.context.properties.EnableConfigurationProperties; |
|||
import org.springframework.cache.annotation.EnableCaching; |
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.context.annotation.Configuration; |
|||
import org.springframework.data.redis.cache.RedisCacheConfiguration; |
|||
import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer; |
|||
import org.springframework.data.redis.serializer.RedisSerializationContext; |
|||
import org.springframework.data.redis.serializer.StringRedisSerializer; |
|||
|
|||
@Configuration |
|||
@EnableCaching |
|||
@EnableConfigurationProperties(CacheProperties.class) |
|||
public class RedisConfig { |
|||
|
|||
// @Autowired |
|||
// CacheProperties cacheProperties; |
|||
|
|||
@Bean |
|||
public RedisCacheConfiguration redisCacheConfiguration(CacheProperties cacheProperties) { |
|||
RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig(); |
|||
config = config.serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(new StringRedisSerializer())); |
|||
config = config.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(new GenericJackson2JsonRedisSerializer())); |
|||
|
|||
|
|||
CacheProperties.Redis redis = cacheProperties.getRedis(); |
|||
|
|||
if (redis.getTimeToLive() != null) { |
|||
config = config.entryTtl(redis.getTimeToLive()); |
|||
} |
|||
if (!redis.isCacheNullValues()) { |
|||
config = config.disableCachingNullValues(); |
|||
} |
|||
if (!redis.isUseKeyPrefix()) { |
|||
config = config.disableKeyPrefix(); |
|||
} |
|||
return config; |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -1,17 +0,0 @@ |
|||
package com.example.demo.config; |
|||
|
|||
import org.springframework.context.annotation.Bean; |
|||
import org.springframework.context.annotation.Configuration; |
|||
import org.springframework.web.reactive.function.client.WebClient; |
|||
|
|||
|
|||
@Configuration |
|||
public class WebClientConfig { |
|||
|
|||
@Bean |
|||
public WebClient webClient() { |
|||
return WebClient.builder() |
|||
.baseUrl("http://hwapi.rzfwq.com") |
|||
.build(); |
|||
} |
|||
} |
@ -1,17 +0,0 @@ |
|||
package com.example.demo.config; |
|||
|
|||
import org.springframework.beans.factory.annotation.Configurable; |
|||
import org.springframework.beans.factory.annotation.Value; |
|||
import org.springframework.context.annotation.Configuration; |
|||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; |
|||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
|||
|
|||
@Configuration |
|||
public class WebConfig implements WebMvcConfigurer { |
|||
@Value("${upload.path}") |
|||
private String path; |
|||
@Override |
|||
public void addResourceHandlers(ResourceHandlerRegistry registry) { |
|||
registry.addResourceHandler("/upload/**").addResourceLocations("file:" + path); |
|||
} |
|||
} |
@ -1,43 +0,0 @@ |
|||
//package com.example.demo.config; |
|||
// |
|||
//import com.zaxxer.hikari.HikariDataSource; |
|||
//import org.apache.ibatis.session.SqlSessionFactory; |
|||
//import org.mybatis.spring.SqlSessionFactoryBean; // 修复:正确导入类 |
|||
//import org.mybatis.spring.SqlSessionTemplate; |
|||
//import org.mybatis.spring.annotation.MapperScan; |
|||
//import org.springframework.beans.factory.annotation.Qualifier; |
|||
//import org.springframework.boot.context.properties.ConfigurationProperties; |
|||
//import org.springframework.boot.jdbc.DataSourceBuilder; |
|||
//import org.springframework.context.annotation.Bean; |
|||
//import org.springframework.context.annotation.Configuration; |
|||
//import org.springframework.context.annotation.Primary; |
|||
//import org.springframework.core.io.support.PathMatchingResourcePatternResolver; |
|||
// |
|||
//import javax.sql.DataSource; |
|||
// |
|||
///** |
|||
// * 数据库leadnews_user配置 |
|||
// */ |
|||
//@Configuration |
|||
//@MapperScan(basePackages = {"com.example.demo.mapperLink"}, sqlSessionFactoryRef = "sqlSessionFactoryUser") |
|||
//public class dBSrcUser { |
|||
// |
|||
// @Bean(name = "mysql2DataSource") |
|||
// @ConfigurationProperties(prefix = "spring.datasource.mysql2") |
|||
// public DataSource hljwDataSource() { |
|||
// return DataSourceBuilder.create().type(HikariDataSource.class).build(); |
|||
// } |
|||
// |
|||
// @Bean(name = "mysql2SqlSessionFactory") |
|||
// public SqlSessionFactory hljwSqlSessionFactory(@Qualifier("mysql2DataSource") DataSource dataSource) throws Exception { |
|||
// SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); |
|||
// sessionFactory.setDataSource(dataSource); |
|||
// sessionFactory.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath:mapperlink/*.xml")); |
|||
// return sessionFactory.getObject(); |
|||
// } |
|||
// |
|||
// @Bean(name = "mysql2SqlSessionTemplate") |
|||
// public SqlSessionTemplate hljwSqlSessionTemplate(@Qualifier("mysql2SqlSessionFactory") SqlSessionFactory sqlSessionFactory) { |
|||
// return new SqlSessionTemplate(sqlSessionFactory); |
|||
// } |
|||
//} |
@ -1,64 +0,0 @@ |
|||
package com.example.demo.controller; |
|||
|
|||
|
|||
import com.example.demo.domain.entity.Activity; |
|||
import com.example.demo.domain.vo.Page; |
|||
import com.example.demo.domain.vo.Result; |
|||
import com.example.demo.serviceImpl.ActivityServiceImpl; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.util.ObjectUtils; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
@RestController |
|||
@RequestMapping("/recharge/activity") |
|||
//SpringMVC的,为当前类的所有处理器方法,添加路径映射的前缀 |
|||
@RequiredArgsConstructor |
|||
// lombok的,添加一个包含所有final属性的构造器 |
|||
@Slf4j //lombok的,自动添加log的对象,用于日志打印 |
|||
@CrossOrigin |
|||
public class ActivityController { |
|||
|
|||
@Autowired |
|||
ActivityServiceImpl activityService; |
|||
|
|||
//添加活动管理信息 |
|||
@PostMapping("/add") |
|||
public Result add(@RequestBody Activity activity) { |
|||
// try { |
|||
int result=activityService.add(activity); |
|||
return Result.success(); |
|||
// } catch (Exception e) { |
|||
// log.warn(Arrays.toString(e.getStackTrace())); |
|||
// return Result.error(e.getMessage()); |
|||
// } |
|||
|
|||
} |
|||
|
|||
//修改活动管理信息 |
|||
@PostMapping("/edit") |
|||
public Result edit(@RequestBody Activity activity){ |
|||
|
|||
// try { |
|||
Integer num =activityService.edit(activity); |
|||
return Result.success(num); |
|||
// } catch (Exception e) { |
|||
//// log.error(""+e); |
|||
//// return Result.error(e.getMessage()); |
|||
//// } |
|||
} |
|||
//查询活动管理信息--模糊+分页查询 |
|||
@PostMapping("/select") |
|||
public Result search(@RequestBody Page page){ |
|||
Integer pageNum = page.getPageNum(); |
|||
Integer pageSize=page.getPageSize(); |
|||
Activity activity= page.getActivity(); |
|||
if (ObjectUtils.isEmpty(pageNum)){ |
|||
return Result.success(activityService.search(activity)); |
|||
} |
|||
return Result.success(activityService.searchForPage(pageNum,pageSize,activity)); |
|||
} |
|||
|
|||
|
|||
} |
@ -1,118 +0,0 @@ |
|||
package com.example.demo.controller; |
|||
import com.example.demo.Util.JWTUtil; |
|||
import com.example.demo.Util.TokenPayload; |
|||
import com.example.demo.domain.entity.Admin; |
|||
import com.example.demo.domain.vo.Page; |
|||
import com.example.demo.domain.vo.Result; |
|||
import com.example.demo.sevice.AdminService; |
|||
import com.fasterxml.jackson.core.JsonProcessingException; |
|||
import com.fasterxml.jackson.databind.ObjectMapper; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
|
|||
import org.springframework.security.core.userdetails.UserDetails; |
|||
import org.springframework.util.ObjectUtils; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
@RestController |
|||
@RequestMapping("/admin") |
|||
@RequiredArgsConstructor |
|||
@Slf4j |
|||
@CrossOrigin |
|||
public class AdminController { |
|||
|
|||
|
|||
private final AdminService adminService; |
|||
|
|||
@PostMapping("/add") |
|||
public Result add(@RequestBody Admin admin){ |
|||
try { |
|||
return Result.success(adminService.add(admin)); |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
log.error(e.getMessage()); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
} |
|||
|
|||
@PostMapping("/search") |
|||
public Result search(@RequestBody Page page){ |
|||
if(ObjectUtils.isEmpty(page.getPageNum())){ |
|||
return Result.success(adminService.search(page.getAdmin())); |
|||
} |
|||
else { |
|||
return Result.success(adminService.searchForPage(page.getPageNum(), page.getPageSize(), page.getAdmin())); |
|||
} |
|||
} |
|||
|
|||
@PostMapping("/area") |
|||
|
|||
public Result area(){ |
|||
return Result.success(adminService.area()); |
|||
} |
|||
@PostMapping("/store") |
|||
public Result store(){ |
|||
return Result.success(adminService.store()); |
|||
} |
|||
|
|||
@PostMapping("/login") |
|||
public Result login(@RequestBody Admin admin){ |
|||
|
|||
|
|||
try { |
|||
|
|||
admin = adminService.login(admin); |
|||
|
|||
String token = JWTUtil.createJWT(admin); |
|||
|
|||
admin.setPassword(null); |
|||
return Result.success(token,admin); |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
log.error(e.getMessage()); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
|
|||
} |
|||
@PostMapping("/userinfo") |
|||
public UserDetails getUserInfo(@RequestBody String requestBody) { |
|||
ObjectMapper objectMapper = new ObjectMapper(); |
|||
TokenPayload token1; |
|||
try { |
|||
token1 = objectMapper.readValue(requestBody, TokenPayload.class); |
|||
} catch (JsonProcessingException e) { |
|||
throw new RuntimeException(e); |
|||
} |
|||
String token = token1.getToken(); |
|||
|
|||
System.out.println("1/*/*/*/*//*-*-*-*-*-*-1" +token); |
|||
try { |
|||
System.out.println("/+/+/+/+/+/+/+//" + JWTUtil.getUserDetailsList(String.valueOf(token), Admin.class)); |
|||
return JWTUtil.getUserDetailsList(String.valueOf(token), Admin.class); |
|||
} catch (Exception e) { |
|||
throw new RuntimeException(e); |
|||
} |
|||
} |
|||
|
|||
@PostMapping("/update") |
|||
public Result update(@RequestBody Admin admin){ |
|||
try { |
|||
return Result.success(adminService.edit(admin)); |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
log.error(e.getMessage()); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
} |
|||
|
|||
@PostMapping("/selectNo") |
|||
public Result selectNo(@RequestBody Admin admin){ |
|||
try { |
|||
return Result.success(adminService.selectNo(admin)); |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
log.error(e.getMessage()); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
} |
|||
} |
@ -1,196 +0,0 @@ |
|||
package com.example.demo.controller; |
|||
|
|||
|
|||
import com.example.demo.Util.GoldTistV2; |
|||
import com.example.demo.domain.entity.*; |
|||
import com.example.demo.domain.vo.Page; |
|||
import com.example.demo.domain.vo.Result; |
|||
import com.example.demo.mapper.*; |
|||
import com.example.demo.sevice.AuditService; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
import org.springframework.util.ObjectUtils; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDate; |
|||
import java.time.Month; |
|||
import java.util.Arrays; |
|||
|
|||
@RestController |
|||
@RequestMapping("/audit/audit") |
|||
@RequiredArgsConstructor |
|||
@Slf4j |
|||
@Transactional |
|||
@CrossOrigin |
|||
public class AuditController { |
|||
@Autowired |
|||
private RefundMapper refundMapper; |
|||
@Autowired |
|||
private UserMapper userMapper; |
|||
@Autowired |
|||
private DetailMapper detailMapper; |
|||
private final AuditService auditService; |
|||
@Autowired |
|||
private AdminMapper adminMapper; |
|||
@Autowired |
|||
private ConsumeMapper consumeMapper; |
|||
|
|||
@PostMapping("/add") |
|||
public Result add(@RequestBody Audit audit){ |
|||
try { |
|||
auditService.add(audit); |
|||
return Result.success(); |
|||
}catch (Exception e){ |
|||
log.warn(Arrays.toString(e.getStackTrace())); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
} |
|||
|
|||
@PostMapping("/goldedit") |
|||
public Result goldedit(@RequestBody Audit audit) throws Exception { |
|||
auditService.goldedit(audit); |
|||
return Result.success(); |
|||
} |
|||
|
|||
@PostMapping("/edit") |
|||
public Result edit(@RequestBody Audit audit){ |
|||
|
|||
//先执行auditService.edit(audit); |
|||
//然后创建一个类,去接收这个audit,如果status=1 |
|||
//根据退款ID找到detail表中的记录获取到他的三种金币 |
|||
//把金币加到user表中对应的金币中 |
|||
|
|||
auditService.edit(audit); |
|||
|
|||
//退款通过 |
|||
if(audit.getStatus() == 1 && audit.getRefundId()!=null){ |
|||
Detail detail = detailMapper.selectByDetailId(audit.getRefundId()); |
|||
BigDecimal rechargeCoin = detail.getRechargeCoin(); |
|||
BigDecimal taskCoin = detail.getTaskCoin(); |
|||
BigDecimal freeCoin = detail.getFreeCoin(); |
|||
String good = detail.getRefundGoods(); |
|||
|
|||
String jwcode = detail.getJwcode(); |
|||
|
|||
User user = userMapper.selectByJwcode(detail.getJwcode()); |
|||
user.setBuyJb(user.getBuyJb().add(rechargeCoin)); |
|||
user.setCoreJb(user.getCoreJb().add(taskCoin)); |
|||
User user1 = userMapper.selectByJwcode1(detail.getJwcode()); |
|||
|
|||
Admin admin =adminMapper.selectById(audit.getAdminId()); |
|||
|
|||
|
|||
LocalDate now = LocalDate.now(); |
|||
Month currentMonth = now.getMonth(); |
|||
|
|||
// 判断月份范围并返回对应值 |
|||
if (currentMonth.getValue() <= 6) { |
|||
user.setFree6(user.getFree6().add(freeCoin)); // 在1月到6月时返回的值 |
|||
} else { |
|||
user.setFree12(user.getFree12().add(freeCoin)); // 在7月到12月时返回的值 |
|||
} |
|||
detail.setUsername(user1.getName()); // 获取 user 的 name 设置到 detail 的 username |
|||
detail.setArea(user1.getArea()); // 获取 user 的 area 设置到 detail 的 area |
|||
detail.setName(admin.getName()); |
|||
// refundMapper.inserty(detail); |
|||
// refundMapper.updateOrderCode(detail.getContactId()); |
|||
// userMapper.update(user); |
|||
if(rechargeCoin!=null&&rechargeCoin.compareTo(BigDecimal.ZERO)!=0){ |
|||
GoldTistV2.addCoinNew(detail.getJwcode(), 56, rechargeCoin.doubleValue(), "金币退款", rechargeCoin.doubleValue(), admin.getName(), good); |
|||
} |
|||
if(freeCoin!=null&&freeCoin.compareTo(BigDecimal.ZERO)!=0){ |
|||
GoldTistV2.addCoinNew(detail.getJwcode(), 55, freeCoin.doubleValue(), "金币退款", 0, admin.getName(), good); |
|||
} |
|||
if(taskCoin!=null&&taskCoin.compareTo(BigDecimal.ZERO)!=0){ |
|||
GoldTistV2.addCoinNew(detail.getJwcode(), 57, taskCoin.doubleValue(),"金币退款", 0, admin.getName(), good); |
|||
} |
|||
} |
|||
// 充值驳回 |
|||
// if (audit.getStatus() == 2 && audit.getRechargeId() != null) { |
|||
// // 获取 detail1 对象 |
|||
// DetailY detail1 = detailMapper.selectByDetailId(audit.getDetailId()); |
|||
// if (detail1 == null) { |
|||
// throw new RuntimeException("驳回失败!未找到对应的 DetailY 信息,audit.getDetailId() = " + audit.getDetailId()); |
|||
// } |
|||
// |
|||
// // 获取金币数据 |
|||
// BigDecimal rechargeCoin1 = detail1.getRechargeCoin(); |
|||
// BigDecimal taskCoin1 = detail1.getTaskCoin(); |
|||
// BigDecimal freeCoin1 = detail1.getFreeCoin(); |
|||
// |
|||
// // 获取 user1 对象 |
|||
// User user1 = userMapper.selectByJwcode(detail1.getJwcode()); |
|||
// if (user1 == null) { |
|||
// throw new RuntimeException("驳回失败!未找到对应的用户信息,detail1.getJwcode() = " + detail1.getJwcode()); |
|||
// } |
|||
// |
|||
// // 检查并更新用户金币 |
|||
// if (rechargeCoin1 != null) { |
|||
// if (user1.getBuyJb().compareTo(rechargeCoin1) < 0) { |
|||
// throw new RuntimeException("驳回失败!该用户剩余 BuyJb 金币不足扣除数量!"); |
|||
// } else { |
|||
// user1.setBuyJb(user1.getBuyJb().subtract(rechargeCoin1)); |
|||
// } |
|||
// } |
|||
// |
|||
// if (taskCoin1 != null) { |
|||
// if (user1.getCoreJb().compareTo(taskCoin1) < 0) { |
|||
// throw new RuntimeException("驳回失败!该用户剩余 CoreJb 金币不足扣除数量!"); |
|||
// } else { |
|||
// user1.setCoreJb(user1.getCoreJb().subtract(taskCoin1)); |
|||
// } |
|||
// } |
|||
// |
|||
// |
|||
// // 判断当前月份 |
|||
// LocalDate now1 = LocalDate.now(); |
|||
// Month currentMonth1 = now1.getMonth(); |
|||
// |
|||
// // 检查 free6 或 free12 的金币是否足够 |
|||
// if (freeCoin1 != null) { |
|||
// if (currentMonth1.getValue() <= 6) { |
|||
// if (user1.getFree6().compareTo(freeCoin1) < 0) { |
|||
// throw new RuntimeException("驳回失败!该用户剩余 free6 金币不足扣除数量!"); |
|||
// } else { |
|||
// user1.setFree6(user1.getFree6().subtract(freeCoin1)); |
|||
// } |
|||
// } else { |
|||
// if (user1.getFree12().compareTo(freeCoin1) < 0) { |
|||
// throw new RuntimeException("驳回失败!该用户剩余 free12 金币不足扣除数量!"); |
|||
// } else { |
|||
// user1.setFree12(user1.getFree12().subtract(freeCoin1)); |
|||
// } |
|||
// } |
|||
// } |
|||
// |
|||
// // 更新用户信息到数据库 |
|||
// userMapper.update(user1); |
|||
// } |
|||
|
|||
return Result.success(); |
|||
|
|||
} |
|||
@PostMapping |
|||
public Result search(@RequestBody Page page){ |
|||
if(ObjectUtils.isEmpty(page.getPageNum())){ |
|||
return Result.success(auditService.search(page.getAudit())); |
|||
} |
|||
else { |
|||
return Result.success(auditService.searchForPage(page.getPageNum(),page.getPageSize(),page.getAudit())); |
|||
} |
|||
} |
|||
@PostMapping("/refund") |
|||
public Result searchForPage(@RequestBody Page page){ |
|||
if(ObjectUtils.isEmpty(page.getPageNum())){ |
|||
return Result.success(auditService.searchForDetail(page.getDetail())); |
|||
} |
|||
else { |
|||
return Result.success(auditService.searchForConsumeDetail(page.getPageNum(), page.getPageSize(), page.getDetail())); |
|||
} |
|||
|
|||
} |
|||
} |
|||
|
@ -1,99 +0,0 @@ |
|||
package com.example.demo.controller; |
|||
|
|||
import com.example.demo.domain.entity.Detail; |
|||
import com.example.demo.domain.entity.DetailY; |
|||
import com.example.demo.domain.vo.*; |
|||
//import com.example.demo.controller.KafkaProducer; |
|||
import com.example.demo.serviceImpl.ConsumeServiceImpl; |
|||
import com.example.demo.serviceImpl.UserServiceImpl; |
|||
import com.fasterxml.jackson.databind.ObjectMapper; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.util.ObjectUtils; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
|
|||
@RestController |
|||
@RequestMapping("/consume") |
|||
@RequiredArgsConstructor |
|||
@Slf4j |
|||
@CrossOrigin |
|||
public class ConsumeController { |
|||
|
|||
@Autowired |
|||
private ConsumeServiceImpl consumeService; |
|||
|
|||
@Autowired |
|||
private UserServiceImpl userService; |
|||
|
|||
// @Autowired |
|||
// private KafkaProducer kafkaProducer; |
|||
|
|||
@PostMapping("/add") |
|||
public Result add(@RequestBody DetailY detailY) throws Exception { |
|||
try { |
|||
// 将 Detail 对象转换为 JSON 字符串 |
|||
ObjectMapper objectMapper = new ObjectMapper(); |
|||
String detailJson = objectMapper.writeValueAsString(detailY); |
|||
|
|||
// // 发送消息到 Kafka 队列 |
|||
// kafkaProducer.sendMessage("consume-topic", detailJson); |
|||
consumeService.insert(detailY); |
|||
} catch (Exception e) { |
|||
log.error(Arrays.toString(e.getStackTrace())); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
return Result.success(); |
|||
} |
|||
|
|||
@PostMapping("/select") |
|||
public Result search(@RequestBody Page page) { |
|||
if(ObjectUtils.isEmpty(page.getPageNum())){ |
|||
return Result.success(consumeService.search(page.getConsumeDetail())); |
|||
} |
|||
else { |
|||
return Result.success(consumeService.searchForPage(page.getPageNum(), page.getPageSize(), page.getConsumeDetail())); |
|||
} |
|||
} |
|||
|
|||
@PostMapping("/getDeatil") |
|||
public Result getDeatil(@RequestBody UserVo userVo) { |
|||
try { |
|||
userService.search(userVo); |
|||
|
|||
return Result.success(consumeService.getDeatil(userVo.getJwcode())); |
|||
} catch (Exception e) { |
|||
log.error(Arrays.toString(e.getStackTrace())); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
} |
|||
|
|||
@PostMapping("/getProduct") |
|||
public Result getProduct(@RequestParam("name") String name) { |
|||
System.out.println(name + "name"); |
|||
return Result.success(consumeService.getProduct(name)); |
|||
} |
|||
@PostMapping("/SumConsume") |
|||
public Result getSumConsume(@RequestBody SumConsume sumConsume) { |
|||
try { |
|||
return Result.success(consumeService.getSumConsume(sumConsume)); |
|||
} catch (Exception e) { |
|||
log.error(Arrays.toString(e.getStackTrace())); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
} |
|||
|
|||
@PostMapping("/getConsume") |
|||
public Result getConsume() { |
|||
try { |
|||
List<String> result = consumeService.getConsume(); |
|||
return Result.success(result); |
|||
} catch (Exception e) { |
|||
log.error(Arrays.toString(e.getStackTrace())); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
} |
|||
} |
@ -1,42 +0,0 @@ |
|||
package com.example.demo.controller; |
|||
|
|||
|
|||
import com.example.demo.domain.entity.Detail; |
|||
import com.example.demo.domain.vo.Page; |
|||
import com.example.demo.domain.vo.Result; |
|||
import com.example.demo.sevice.DetailService; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.util.ObjectUtils; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Arrays; |
|||
|
|||
|
|||
@RestController |
|||
@RequestMapping("/detail") |
|||
@RequiredArgsConstructor |
|||
@Slf4j |
|||
@CrossOrigin |
|||
public class DetailController { |
|||
private final DetailService detailService; |
|||
@PostMapping("/add") |
|||
public Result add(@RequestBody Detail detail) { |
|||
try { |
|||
detailService.add(detail); |
|||
return Result.success(); |
|||
} catch (Exception e) { |
|||
log.warn(Arrays.toString(e.getStackTrace())); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
} |
|||
@PostMapping |
|||
public Result search(@RequestBody Page page) { |
|||
if(ObjectUtils.isEmpty(page.getPageNum())){ |
|||
return Result.success(detailService.getAllDetail(page.getDetail())); |
|||
} |
|||
else { |
|||
return Result.success(detailService.getDetailByPage(page.getPageNum(), page.getPageSize(), page.getDetail())); |
|||
} |
|||
} |
|||
} |
@ -1,77 +0,0 @@ |
|||
package com.example.demo.controller; |
|||
|
|||
|
|||
import com.example.demo.domain.entity.Detail; |
|||
import com.example.demo.domain.entity.DetailY; |
|||
import com.example.demo.domain.entity.UserDetailExport; |
|||
import com.example.demo.domain.vo.*; |
|||
import com.example.demo.sevice.DetailService; |
|||
import com.example.demo.sevice.DetailYService; |
|||
//import com.example.demo.sevice.OtherService; |
|||
import com.example.demo.sevice.OtherService; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.util.ObjectUtils; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
|
|||
|
|||
@RestController |
|||
@RequestMapping("/detailY") |
|||
@RequiredArgsConstructor |
|||
@Slf4j |
|||
@CrossOrigin |
|||
public class DetailYController { |
|||
private final DetailYService detailYService; |
|||
private final OtherService otherService; |
|||
@PostMapping("/add") |
|||
public Result add(@RequestBody DetailY detailY) { |
|||
try { |
|||
detailYService.add(detailY); |
|||
return Result.success(); |
|||
} catch (Exception e) { |
|||
log.warn(Arrays.toString(e.getStackTrace())); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
} |
|||
@PostMapping |
|||
public Result search(@RequestBody Page page) { |
|||
if(ObjectUtils.isEmpty(page.getPageNum())){ |
|||
return Result.success(detailYService.getCount(page.getDetailY())); |
|||
} |
|||
else { |
|||
return Result.success(detailYService.getDetailByPage(page.getPageNum(), page.getPageSize(), page.getDetailY())); |
|||
} |
|||
} |
|||
@PostMapping("/select") |
|||
public Result searchgold(@RequestBody Page page) { |
|||
if(ObjectUtils.isEmpty(page.getPageNum())){ |
|||
return Result.success(detailYService.getgold(page.getDetailYgold())); |
|||
} |
|||
else { |
|||
return Result.success(detailYService.selectgold(page.getPageNum(), page.getPageSize(), page.getDetailYgold())); |
|||
} |
|||
} |
|||
@PostMapping("/searchAll") |
|||
public Result searchAll(@RequestBody DetailExport detailExport) { |
|||
return Result.success(detailYService.searchAll(detailExport)); |
|||
} |
|||
@PostMapping("/ERP") |
|||
public Result addERP(@RequestBody ERP erp) throws Exception { |
|||
log.info("erp:{}", erp); |
|||
return Result.success(otherService.addERP(erp)); |
|||
} |
|||
@PostMapping("/getDetailY") |
|||
public Result getDetailY(@RequestBody SumDetailY sumDetailY) { |
|||
List<SumDetailY> result = detailYService.getDetailY(sumDetailY); |
|||
return Result.success(result); |
|||
} |
|||
|
|||
@PostMapping("/getarea") |
|||
public Result getarea() { |
|||
List<String> result = detailYService.getarea(); |
|||
return Result.success(result); |
|||
} |
|||
} |
@ -1,117 +0,0 @@ |
|||
package com.example.demo.controller; |
|||
|
|||
|
|||
|
|||
import com.example.demo.domain.dou.*; |
|||
import com.example.demo.domain.vo.Page; |
|||
import com.example.demo.domain.vo.Result; |
|||
import com.example.demo.sevice.DouService; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.util.ObjectUtils; |
|||
import org.springframework.web.bind.annotation.CrossOrigin; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.Arrays; |
|||
|
|||
@RestController |
|||
@RequestMapping("/dou") |
|||
@RequiredArgsConstructor |
|||
@Slf4j |
|||
@CrossOrigin |
|||
public class DouController { |
|||
private final DouService douService; |
|||
@RequestMapping("/search") |
|||
public Result search(@RequestBody Searchinfo jwcode) throws Exception{ |
|||
try { |
|||
return Result.success(douService.searchinfo(jwcode)); |
|||
}catch (Exception e) { |
|||
log.error(Arrays.toString(e.getStackTrace())); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
} |
|||
@RequestMapping("/add") |
|||
public Result add(@RequestBody Records records) throws Exception{ |
|||
try { |
|||
return Result.success(douService.add(records)); |
|||
}catch (Exception e) { |
|||
log.error(Arrays.toString(e.getStackTrace())); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
} |
|||
|
|||
@RequestMapping("/getYve") |
|||
public Result getYve(@RequestBody Page page){ |
|||
if (ObjectUtils.isEmpty(page.getPageNum())) { |
|||
System.out.println(page.getYve()+"-----"); |
|||
return Result.success(douService.getYve(page.getYve())); |
|||
} else { |
|||
System.out.println(page.getYve()+"++++"); |
|||
return Result.success(douService.searchForPage(page.getPageNum(), page.getPageSize(), page.getYve())); |
|||
} |
|||
} |
|||
@RequestMapping("/getYveTotal") |
|||
public Result getYveTotal(@RequestBody YveTotal yveTotal){ |
|||
System.out.println(douService.getYveTotal(yveTotal)); |
|||
return Result.success(douService.getYveTotal(yveTotal)); |
|||
} |
|||
@RequestMapping("/getIp") |
|||
public Result getIp(){ |
|||
return Result.success(douService.getIp()); |
|||
} |
|||
@RequestMapping("/getStyle") |
|||
public Result getStyle(){ |
|||
return Result.success(douService.getStyle()); |
|||
} |
|||
@RequestMapping("/getPayIp") |
|||
public Result getPayIp(){ |
|||
return Result.success(douService.getPayIp()); |
|||
} |
|||
@RequestMapping("/getPay") |
|||
public Result getPay(@RequestBody Page page){ |
|||
if (ObjectUtils.isEmpty(page.getPageNum())) { |
|||
|
|||
return Result.success(douService.getPay(page.getPay())); |
|||
} else { |
|||
return Result.success(douService.searchPay(page.getPageNum(), page.getPageSize(), page.getPay())); |
|||
} |
|||
} |
|||
@RequestMapping("/getSpend") |
|||
public Result getSpend(@RequestBody Page page){ |
|||
if (ObjectUtils.isEmpty(page.getPageNum())) { |
|||
return Result.success(douService.getSpend(page.getSpend())); |
|||
} else { |
|||
return Result.success(douService.searchSpend(page.getPageNum(), page.getPageSize(), page.getSpend())); |
|||
} |
|||
} |
|||
@RequestMapping("/getSpendTotal") |
|||
public Result getSpendTotal(@RequestBody SpendTotal spendTotal){ |
|||
return Result.success(douService.getSpendTotal(spendTotal)); |
|||
} |
|||
@RequestMapping("/getRechargeTotal") |
|||
public Result getRechargeTotal(@RequestBody RechargeTotal rechargeTotal){ |
|||
return Result.success(douService.getRechargeTotal(rechargeTotal)); |
|||
} |
|||
@RequestMapping("/SearchPay") |
|||
public Result SearchPay(@RequestBody Page page){ |
|||
if (ObjectUtils.isEmpty(page.getPageNum())) { |
|||
return Result.success(douService.SearchPay(page.getPay())); |
|||
} else { |
|||
return Result.success(douService.SearchPay(page.getPageNum(), page.getPageSize(), page.getPay())); |
|||
} |
|||
} |
|||
@RequestMapping("/SearchStyle") |
|||
public Result SearchStyle(){ |
|||
return Result.success(douService.SearchStyle()); |
|||
} |
|||
@RequestMapping("/SearchPayIp") |
|||
public Result SearchPayIp(){ |
|||
return Result.success(douService.SearchPayIp()); |
|||
} |
|||
@RequestMapping("/getTotal") |
|||
public Result getTotal(@RequestBody Total total){ |
|||
return Result.success(douService.getTotal(total)); |
|||
} |
|||
} |
@ -1,9 +0,0 @@ |
|||
//package com.example.demo.controller; |
|||
// |
|||
//import org.springframework.context.annotation.Configuration; |
|||
//import org.springframework.kafka.annotation.EnableKafka; |
|||
// |
|||
//@Configuration |
|||
//@EnableKafka |
|||
//public class KafkaConfig { |
|||
//} |
@ -1,76 +0,0 @@ |
|||
//package com.example.demo.controller; |
|||
// |
|||
//import com.example.demo.domain.entity.Detail; |
|||
//import com.example.demo.domain.entity.DetailY; |
|||
//import com.example.demo.domain.entity.Recharge; |
|||
//import com.example.demo.serviceImpl.ConsumeServiceImpl; |
|||
//import com.example.demo.sevice.RechargeService; |
|||
//import com.fasterxml.jackson.core.type.TypeReference; |
|||
//import com.fasterxml.jackson.databind.ObjectMapper; |
|||
//import lombok.extern.slf4j.Slf4j; |
|||
//import org.springframework.beans.factory.annotation.Autowired; |
|||
//import org.springframework.kafka.annotation.KafkaListener; |
|||
//import org.springframework.stereotype.Service; |
|||
// |
|||
//import java.io.IOException; |
|||
//import java.util.List; |
|||
// |
|||
//@Service |
|||
//@Slf4j |
|||
//public class KafkaConsumer { |
|||
// |
|||
// @Autowired |
|||
// private ConsumeServiceImpl consumeService; |
|||
// |
|||
// @Autowired |
|||
// private RechargeService rechargeService; |
|||
// |
|||
// private final ObjectMapper objectMapper = new ObjectMapper(); |
|||
// |
|||
// @KafkaListener(topics = "rechargeadd_topic") |
|||
// public void listenRechargeadd(String message) { |
|||
// try { |
|||
// // 反序列化为List<Recharge> |
|||
// List<Recharge> rechargeList = objectMapper.readValue(message, new TypeReference<List<Recharge>>() {}); |
|||
// |
|||
// // 遍历并处理每个充值记录 |
|||
// for (Recharge recharge : rechargeList) { |
|||
// processRecharge(recharge); |
|||
// } |
|||
// } catch (IOException e) { |
|||
// // 处理反序列化异常 |
|||
// e.printStackTrace(); |
|||
// } |
|||
// } |
|||
// |
|||
// private void processRecharge(Recharge recharge) { |
|||
// // 具体的业务处理逻辑 |
|||
// System.out.println("Processing recharge: " + recharge); |
|||
// } |
|||
// |
|||
// @KafkaListener(topics = "consume-topic", groupId = "my-group") |
|||
// public void listenConsume(String message) { |
|||
// try { |
|||
// DetailY detailY = objectMapper.readValue(message, DetailY.class); |
|||
// |
|||
// // 处理消费请求 |
|||
// Integer result = consumeService.insert(detailY); |
|||
// log.info("Processed consume request with result: {}", result); |
|||
// } catch (Exception e) { |
|||
// log.error("Error processing consume message: {}", message, e); |
|||
// } |
|||
// } |
|||
// |
|||
// @KafkaListener(topics = "recharge-topic", groupId = "my-group") |
|||
// public void listenRecharge(String message) { |
|||
// try { |
|||
// Recharge recharge = objectMapper.readValue(message, Recharge.class); |
|||
// |
|||
// // 处理充值请求 |
|||
// rechargeService.add(recharge); |
|||
// log.info("Processed recharge request with id: {}", recharge.getRechargeId()); |
|||
// } catch (Exception e) { |
|||
// log.error("Error processing recharge message: {}", message, e); |
|||
// } |
|||
// } |
|||
//} |
@ -1,16 +0,0 @@ |
|||
//package com.example.demo.controller; |
|||
// |
|||
//import org.springframework.beans.factory.annotation.Autowired; |
|||
//import org.springframework.kafka.core.KafkaTemplate; |
|||
//import org.springframework.stereotype.Service; |
|||
// |
|||
//@Service |
|||
//public class KafkaProducer { |
|||
// |
|||
// @Autowired |
|||
// private KafkaTemplate<String, String> kafkaTemplate; |
|||
// |
|||
// public void sendMessage(String topic, String message) { |
|||
// kafkaTemplate.send(topic, message); |
|||
// } |
|||
//} |
@ -1,58 +0,0 @@ |
|||
package com.example.demo.controller; |
|||
|
|||
import com.example.demo.domain.work.One; |
|||
import com.example.demo.domain.work.Three; |
|||
import com.example.demo.domain.work.Two; |
|||
import com.example.demo.sevice.OneService; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
|
|||
@RestController |
|||
@RequestMapping("/One") |
|||
@RequiredArgsConstructor |
|||
@Slf4j |
|||
@CrossOrigin |
|||
public class OneController { |
|||
private final OneService oneService; |
|||
|
|||
// 定义一个DTO类来封装请求参数 |
|||
public static class RequestParams { |
|||
private String token; |
|||
private List<String> areas; |
|||
|
|||
// Getter和Setter方法 |
|||
public String getToken() { |
|||
return token; |
|||
} |
|||
|
|||
public void setToken(String token) { |
|||
this.token = token; |
|||
} |
|||
|
|||
public List<String> getAreas() { |
|||
return areas; |
|||
} |
|||
|
|||
public void setAreas(List<String> areas) { |
|||
this.areas = areas; |
|||
} |
|||
} |
|||
|
|||
@PostMapping("/getOne") |
|||
public One getOne(@RequestBody RequestParams requestParams) throws Exception { |
|||
return oneService.getOne(requestParams.getToken(), requestParams.getAreas()); |
|||
} |
|||
|
|||
@PostMapping("/getTwo") |
|||
public Two getTwo(@RequestBody RequestParams requestParams) throws Exception { |
|||
return oneService.getTwo(requestParams.getToken(), requestParams.getAreas()); |
|||
} |
|||
|
|||
@PostMapping("/getThree") |
|||
public Three getThree(@RequestBody RequestParams requestParams) throws Exception { |
|||
return oneService.getThree(requestParams.getToken(), requestParams.getAreas()); |
|||
} |
|||
} |
@ -1,24 +0,0 @@ |
|||
package com.example.demo.controller; |
|||
|
|||
|
|||
import com.example.demo.domain.vo.Result; |
|||
import com.example.demo.sevice.PermissionService; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.web.bind.annotation.CrossOrigin; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
@RestController |
|||
@RequestMapping("/permission") |
|||
@RequiredArgsConstructor |
|||
@Slf4j |
|||
@CrossOrigin |
|||
public class PermissionController { |
|||
private final PermissionService permissionService; |
|||
|
|||
@RequestMapping("/getPermission") |
|||
public Result getPermission() { |
|||
return Result.success(permissionService.getPermission()); |
|||
} |
|||
} |
@ -1,31 +0,0 @@ |
|||
package com.example.demo.controller; |
|||
|
|||
|
|||
import com.example.demo.domain.entity.Index; |
|||
import com.example.demo.domain.entity.Product; |
|||
import com.example.demo.domain.vo.Result; |
|||
import com.example.demo.sevice.ProductService; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
@RestController |
|||
@RequestMapping("/product") |
|||
@RequiredArgsConstructor |
|||
@Slf4j |
|||
@CrossOrigin |
|||
public class ProductController { |
|||
private final ProductService productService; |
|||
@PostMapping |
|||
public Result Product(@RequestBody Product product){ |
|||
return Result.success(productService.findAll(product)); |
|||
} |
|||
@PostMapping("/add") |
|||
public Result add(@RequestBody Product product){ |
|||
return Result.success(productService.add(product)); |
|||
} |
|||
@PostMapping("/index") |
|||
public Result index(@RequestBody Index index){ |
|||
return Result.success(productService.findIndex(index)); |
|||
} |
|||
} |
@ -1,75 +0,0 @@ |
|||
package com.example.demo.controller; |
|||
|
|||
|
|||
|
|||
import com.example.demo.domain.entity.Rate; |
|||
import com.example.demo.domain.vo.Page; |
|||
import com.example.demo.domain.vo.Result; |
|||
import com.example.demo.sevice.RateService; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
|
|||
import org.springframework.util.ObjectUtils; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Arrays; |
|||
|
|||
@RestController |
|||
@RequestMapping("/rates") |
|||
@RequiredArgsConstructor |
|||
@Slf4j |
|||
@CrossOrigin |
|||
public class RateController { |
|||
private final RateService rateService; |
|||
|
|||
@PostMapping("/add") |
|||
public Result add(@RequestBody Rate rate) { |
|||
try { |
|||
rateService.add(rate); |
|||
return Result.success(); |
|||
} catch (Exception e) { |
|||
log.warn(Arrays.toString(e.getStackTrace())); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
} |
|||
@PostMapping("/update") // 将 PUT 改为 POST |
|||
public Result update(@RequestBody Rate rate) throws Exception { |
|||
rateService.edit(rate); |
|||
return Result.success(); |
|||
} |
|||
|
|||
|
|||
@PostMapping("/delete/{rateId}") // 将 DELETE 改为 POST |
|||
public Result delete(@PathVariable("rateId") Integer rateId) { |
|||
try { |
|||
rateService.softDelete(rateId); |
|||
return Result.success(); |
|||
} catch (Exception e) { |
|||
log.warn(Arrays.toString(e.getStackTrace())); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
} |
|||
|
|||
@PostMapping("/status") |
|||
public Result status(@RequestBody Rate rate) throws Exception { |
|||
return Result.success(rateService.selectByStatus(rate)); |
|||
} |
|||
@PostMapping("/searchById") |
|||
public Result searchById(@RequestParam Integer rateId) { |
|||
|
|||
return Result.success(rateService.getById(rateId)); |
|||
} |
|||
|
|||
@PostMapping("/search") // 改为 POST 请求 |
|||
public Result search(@RequestBody Page page) { |
|||
Integer pageNum = page.getPageNum(); |
|||
Integer pageSize = page.getPageSize(); |
|||
Rate rate = page.getRate(); |
|||
|
|||
if (ObjectUtils.isEmpty(pageNum)) { |
|||
return Result.success(rateService.search(rate)); |
|||
} else { |
|||
return Result.success(rateService.searchForPage(pageNum, pageSize, rate)); |
|||
} |
|||
} |
|||
} |
@ -1,125 +0,0 @@ |
|||
package com.example.demo.controller; |
|||
|
|||
import com.example.demo.domain.entity.Recharge; |
|||
import com.example.demo.domain.vo.Page; |
|||
import com.example.demo.domain.vo.RechargeA; |
|||
import com.example.demo.domain.vo.Result; |
|||
//import com.example.demo.controller.KafkaProducer; |
|||
import com.example.demo.sevice.RechargeService; |
|||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
|||
import com.fasterxml.jackson.databind.ObjectMapper; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.util.ObjectUtils; |
|||
import org.springframework.util.StringUtils; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
import java.util.Objects; |
|||
import java.util.stream.Collectors; |
|||
|
|||
@RestController |
|||
@RequestMapping("/recharge/recharge") |
|||
@RequiredArgsConstructor |
|||
@Slf4j |
|||
@CrossOrigin |
|||
@JsonIgnoreProperties(ignoreUnknown = true) |
|||
public class RechargeController { |
|||
|
|||
private final RechargeService rechargeService; |
|||
private final ObjectMapper objectMapper; // 添加这一行 |
|||
// @Autowired |
|||
// private KafkaProducer kafkaProducer; |
|||
@PostMapping("/addmore") |
|||
public Result add(@RequestBody Map<String, Object> requestBody) { |
|||
try { |
|||
// 获取 token 字段 |
|||
String token = (String) requestBody.get("token"); |
|||
if (StringUtils.hasText(token)) { |
|||
// processToken(token); // 移除或注释掉这一行 |
|||
} |
|||
|
|||
// 提取并转换所有的 Recharge 对象 |
|||
List<Recharge> recharges = requestBody.entrySet().stream() |
|||
.filter(entry -> !entry.getKey().equals("token") && entry.getValue() instanceof Map) |
|||
.map(entry -> { |
|||
try { |
|||
return objectMapper.convertValue(entry.getValue(), Recharge.class); |
|||
} catch (IllegalArgumentException e) { |
|||
log.warn("Failed to convert entry: {}", entry.getKey(), e); |
|||
return null; |
|||
} |
|||
}) |
|||
.filter(Objects::nonNull) |
|||
.collect(Collectors.toList()); |
|||
|
|||
if (recharges.isEmpty()) { |
|||
return Result.error("No valid recharge data found."); |
|||
} |
|||
|
|||
// 将 Recharge 对象转换为 JSON 字符串 |
|||
String rechargeJson = objectMapper.writeValueAsString(recharges); |
|||
|
|||
// 发送消息到 Kafka 队列(如果需要) |
|||
// kafkaProducer.sendMessage("rechargeadd-topic", rechargeJson); |
|||
|
|||
return rechargeService.addRecharges(recharges); |
|||
} catch (Exception e) { |
|||
log.error("Error processing /addmore request", e); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
} |
|||
|
|||
|
|||
@PostMapping("/add") |
|||
public Result add(@RequestBody Recharge recharge) { |
|||
try { |
|||
// 将 Recharge 对象转换为 JSON 字符串 |
|||
ObjectMapper objectMapper = new ObjectMapper(); |
|||
String rechargeJson = objectMapper.writeValueAsString(recharge); |
|||
rechargeService.add(recharge); |
|||
//// // 发送消息到 Kafka 队列 |
|||
//// kafkaProducer.sendMessage("recharge-topic", rechargeJson); |
|||
// |
|||
// return Result.success("Request added to Kafka queue"); |
|||
} catch (Exception e) { |
|||
log.error(Arrays.toString(e.getStackTrace())); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
return Result.success(); |
|||
} |
|||
|
|||
@PostMapping("/edit") |
|||
public Result edit(@RequestBody Recharge recharge) { |
|||
try { |
|||
rechargeService.edit(recharge); |
|||
} catch (Exception e) { |
|||
log.warn(Arrays.toString(e.getStackTrace())); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
return Result.success(); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result search(@RequestBody Page page) { |
|||
if (ObjectUtils.isEmpty(page.getPageNum())) { |
|||
return Result.success(rechargeService.search(page.getRechargeVo())); |
|||
} else { |
|||
return Result.success(rechargeService.searchForPage(page.getPageNum(), page.getPageSize(), page.getRechargeVo())); |
|||
} |
|||
} |
|||
|
|||
@PostMapping("/RechargeA") |
|||
public Result searchRechargeA(@RequestBody RechargeA rechargeA) { |
|||
List<RechargeA> result = rechargeService.getRechargeA(rechargeA); |
|||
return Result.success(result); |
|||
} |
|||
@PostMapping("/getWay") |
|||
public Result getWay() { |
|||
List<String> result = rechargeService.getWay(); |
|||
return Result.success(result); |
|||
} |
|||
} |
@ -1,109 +0,0 @@ |
|||
package com.example.demo.controller; |
|||
|
|||
|
|||
import com.example.demo.domain.entity.Detail; |
|||
import com.example.demo.domain.vo.Page; |
|||
import com.example.demo.domain.vo.RechargeA; |
|||
import com.example.demo.domain.vo.RefundA; |
|||
import com.example.demo.domain.vo.Result; |
|||
import com.example.demo.sevice.RefundService; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
import org.springframework.util.ObjectUtils; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
|
|||
@RestController |
|||
@RequestMapping("/refund") |
|||
@RequiredArgsConstructor |
|||
@Transactional |
|||
@Slf4j |
|||
@CrossOrigin |
|||
public class RefundController { |
|||
private final RefundService refundService; |
|||
|
|||
@PostMapping("/add") |
|||
public Result add(@RequestBody Detail detail) { |
|||
// try { |
|||
if (refundService.existsByContactId(detail.getContactId())) { |
|||
return Result.error("该订单已退款: " + detail.getContactId()); |
|||
} |
|||
|
|||
refundService.add(detail); |
|||
refundService.addAudit(detail); |
|||
|
|||
refundService.update(detail.getContactId()); |
|||
return Result.success(); |
|||
|
|||
} |
|||
|
|||
@PostMapping("/softDelete") |
|||
public Result softDelete(@RequestParam Integer detailId) { |
|||
// try { |
|||
// 获取旧的明细记录 |
|||
Detail oldDetail = refundService.selectByDetailId(detailId); |
|||
|
|||
if (oldDetail == null || oldDetail.getDetailFlag() ==0) { |
|||
return Result.error("该订单不存在: " + detailId); |
|||
} |
|||
refundService.softDelete(detailId); |
|||
return Result.success(); |
|||
// } catch (Exception e) { |
|||
// log.warn(Arrays.toString(e.getStackTrace())); |
|||
// return Result.error(e.getMessage()); |
|||
// } |
|||
} |
|||
|
|||
@PostMapping("/update") |
|||
public Result update(@RequestBody Detail newDetail) { |
|||
try { |
|||
refundService.edit(newDetail); |
|||
return Result.success(); |
|||
} catch (Exception e) { |
|||
log.warn(Arrays.toString(e.getStackTrace())); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
} |
|||
|
|||
@PostMapping("/searchByJWCODE") |
|||
public Result searchByJWCODE(@RequestParam String jwcode) { |
|||
Detail detail = refundService.selectByJWCODE(jwcode); |
|||
// 检查返回的结果是否为空或无效 |
|||
if (detail == null || ObjectUtils.isEmpty(detail.getOrderCode())) { |
|||
return Result.error("该订单不存在:"); |
|||
} |
|||
// 成功时返回包含订单详情的数据 |
|||
return Result.success(detail); |
|||
|
|||
} |
|||
|
|||
@PostMapping("/searchByOrderCode") |
|||
public Result searchByOrderCode(@RequestParam String orderCode) { |
|||
Detail detail = refundService.selectByOrderCode(orderCode); |
|||
// 检查返回的结果是否为空或无效 |
|||
if (detail == null || ObjectUtils.isEmpty(detail.getOrderCode())) { |
|||
return Result.error("该订单不存在:"); |
|||
} |
|||
// 成功时返回包含订单详情的数据 |
|||
return Result.success(detail); |
|||
|
|||
} |
|||
|
|||
@PostMapping("/search") |
|||
public Result search(@RequestBody Page page) { |
|||
if (ObjectUtils.isEmpty(page.getPageNum())) { |
|||
return Result.success(refundService.search(page.getDetail())); |
|||
}else{ |
|||
return Result.success(refundService.searchForPage(page.getPageNum(), page.getPageSize(),page.getDetail())); |
|||
} |
|||
} |
|||
|
|||
@PostMapping("/RefundA") |
|||
public Result getRefundA(@RequestBody RefundA refundA) { |
|||
List<RefundA> result = refundService.getRefundA(refundA); |
|||
return Result.success(result); |
|||
} |
|||
} |
@ -1,112 +0,0 @@ |
|||
package com.example.demo.controller; |
|||
|
|||
|
|||
import com.example.demo.domain.vo.*; |
|||
import com.example.demo.mapper.StatisticsMapper; |
|||
import com.example.demo.serviceImpl.StatisticsServiceImpl; |
|||
import com.example.demo.serviceImpl.UserServiceImpl; |
|||
import com.example.demo.sevice.StatisticsService; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.Arrays; |
|||
|
|||
|
|||
@RestController |
|||
@RequestMapping("/statistics") |
|||
@RequiredArgsConstructor |
|||
@Slf4j |
|||
@CrossOrigin |
|||
public class StatisticsController { |
|||
@Autowired |
|||
private final StatisticsService statisticsService; |
|||
@Autowired |
|||
UserServiceImpl userService; |
|||
@Autowired |
|||
private StatisticsMapper statisticsMapper; |
|||
@Autowired |
|||
private StatisticsServiceImpl statisticsServiceImpl; |
|||
|
|||
|
|||
@PostMapping("/a") |
|||
public Result count() { |
|||
Statistics statistics = statisticsService.getStatistics(); |
|||
return Result.success(statistics); |
|||
} |
|||
@PostMapping("/b") |
|||
public Result select() { |
|||
return Result.success(statisticsService.stats()); |
|||
} |
|||
//--------------------------------------------------------------------------------------// |
|||
@PostMapping("/getSumCoin") |
|||
public Result getSumCoin(){ |
|||
|
|||
return Result.success(statisticsService.getSumCoin()); |
|||
} |
|||
|
|||
@PostMapping("/getYearConsumeCoin") |
|||
public Result getYearConsumeCoin(){ |
|||
return Result.success(statisticsService.getYearConsumeCoin()); |
|||
} |
|||
@PostMapping("/getDayConsumeCoin") |
|||
public Result getDayConsumeCoin(){ |
|||
return Result.success(statisticsService.getDayConsumeCoin()); |
|||
} |
|||
|
|||
@PostMapping("/getMediuPayCoin") |
|||
public Result getMediuPayCoin(){ |
|||
return Result.success(statisticsService.getMediuPayCoin()); |
|||
} |
|||
|
|||
@PostMapping("/getMediuConsumeCoin") |
|||
public Result getMediuConsumeCoin(){ |
|||
return Result.success(statisticsService.getMediuConsumeCoin()); |
|||
} |
|||
|
|||
@PostMapping("/getMess/{jwcode}") |
|||
public Result getMess(@PathVariable("jwcode") Integer jwcode){ |
|||
try { |
|||
UserVo userVo=new UserVo(); |
|||
userVo.setJwcode(jwcode.toString()); |
|||
userService.search(userVo); |
|||
return Result.success(statisticsService.getMess(jwcode)); |
|||
}catch (Exception e){ |
|||
log.error(Arrays.toString(e.getStackTrace())); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
} |
|||
|
|||
@PostMapping("/getMediumAreaPay") |
|||
public Result getMediumAreaPay(){ |
|||
return Result.success(statisticsService.getMediumAreaPay()); |
|||
} |
|||
@PostMapping("/getMediumAreaConsume") |
|||
public Result getMediumAreaConsume(){ |
|||
return Result.success(statisticsService.getMediumAreaConsume()); |
|||
} |
|||
|
|||
|
|||
//中间右侧:支付消费--部门--金币类型--时间 |
|||
@PostMapping("/getMee") |
|||
public Result getMee(@RequestBody Meium meium){ |
|||
return Result.success(statisticsService.getMee(meium)); |
|||
} |
|||
@PostMapping("/getMediu") |
|||
public Result getMediu(){ |
|||
return Result.success(statisticsService.getMediu()); |
|||
} |
|||
|
|||
@PostMapping("/getMediuConsumeCoin2") |
|||
public Result getMediuConsumeCoin2(@RequestBody SumCoin sumCoin){ |
|||
System.out.println(sumCoin.getSearchStartTime()+" -------------searchStartTime----"); |
|||
return Result.success(statisticsMapper.getMediuConsumeCoin2(sumCoin)); |
|||
} |
|||
@PostMapping("/getCoinTime") |
|||
public Result getCoinTime(@RequestBody SumCoin sumcoin){ |
|||
System.out.println(sumcoin.getSearchStartTime()+" -------------searchStartTime----"); |
|||
return Result.success(statisticsServiceImpl.getCoinTime(sumcoin)); |
|||
} |
|||
|
|||
} |
@ -1,29 +0,0 @@ |
|||
package com.example.demo.controller; |
|||
|
|||
|
|||
|
|||
import com.example.demo.Util.UploadUtil; |
|||
import com.example.demo.domain.vo.Result; |
|||
import org.springframework.beans.factory.annotation.Value; |
|||
import org.springframework.util.StringUtils; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.web.multipart.MultipartFile; |
|||
|
|||
import java.io.File; |
|||
import java.io.IOException; |
|||
|
|||
@RestController |
|||
@RequestMapping("/upload") |
|||
@CrossOrigin |
|||
public class UploadController { |
|||
@Value("${upload.path}") |
|||
private String path; |
|||
|
|||
@PostMapping |
|||
public Result upload(MultipartFile file) { |
|||
|
|||
String fileName = UploadUtil.save(file,path); |
|||
return Result.success(fileName); |
|||
} |
|||
|
|||
} |
@ -1,53 +0,0 @@ |
|||
package com.example.demo.controller; |
|||
|
|||
|
|||
import com.example.demo.domain.entity.User; |
|||
import com.example.demo.domain.vo.Result; |
|||
import com.example.demo.domain.vo.UserVo; |
|||
import com.example.demo.sevice.UserSevice; |
|||
import lombok.RequiredArgsConstructor; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.web.bind.annotation.*; |
|||
import org.springframework.http.ResponseEntity; |
|||
import org.springframework.http.HttpStatus; |
|||
|
|||
|
|||
import java.util.Arrays; |
|||
|
|||
@RestController |
|||
@RequestMapping("/recharge/user") |
|||
@RequiredArgsConstructor |
|||
@Slf4j |
|||
@CrossOrigin |
|||
public class UserController { |
|||
private final UserSevice userSevice; |
|||
@PostMapping |
|||
public Result User(@RequestBody UserVo userVo) throws Exception { |
|||
try { |
|||
userSevice.search(userVo); |
|||
return Result.success(userSevice.search(userVo)); |
|||
}catch (Exception e) { |
|||
log.error(Arrays.toString(e.getStackTrace())); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
} |
|||
@PostMapping("/search") |
|||
//调用service.area查询地区 |
|||
public Result search() throws Exception { |
|||
return Result.success(userSevice.area()); |
|||
} |
|||
@PostMapping("/jwcode") |
|||
public Result jwcode() throws Exception { |
|||
return Result.success(userSevice.jwcode()); |
|||
} |
|||
@PostMapping("/add") |
|||
public Result User(@RequestBody User user) throws Exception{ |
|||
try { |
|||
return Result.success(userSevice.add(user)); |
|||
|
|||
} catch (Exception e) { |
|||
log.error(Arrays.toString(e.getStackTrace())); |
|||
return Result.error(e.getMessage()); |
|||
} |
|||
} |
|||
} |
@ -1,29 +0,0 @@ |
|||
package com.example.demo.domain.dou; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class Balance implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Integer id; |
|||
private Integer uid; |
|||
private Integer s1; |
|||
private Integer money; |
|||
private Integer moneyNum; |
|||
private Integer moneyS; |
|||
private Integer jinbi; |
|||
private Integer jinbiNum; |
|||
private Integer jinbiFree; |
|||
private Integer jinbiFreeNum; |
|||
private Integer jinbiBuy; |
|||
private Integer jinbiBuyNum; |
|||
private Integer jinbiCostTotal; |
|||
|
|||
} |
@ -1,25 +0,0 @@ |
|||
package com.example.demo.domain.dou; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class Member implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Integer id; |
|||
private String nickname; |
|||
private String shop; |
|||
private String jwcode; |
|||
private Integer jinbiBuy; |
|||
private Integer jinbiFree; |
|||
private Integer number; |
|||
private String masterNickname; |
|||
private String masterShop; |
|||
|
|||
} |
@ -1,44 +0,0 @@ |
|||
package com.example.demo.domain.dou; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class Pay { |
|||
private String token; |
|||
private Integer jwcode; |
|||
private String OrderNo; |
|||
private String type; |
|||
private String nickname; |
|||
private BigDecimal price; |
|||
private Integer count; |
|||
private String payStyle; |
|||
private Integer state; |
|||
private Integer platfrom; |
|||
private Integer successTime; |
|||
private String name; |
|||
private String deptName; |
|||
private String shopName; |
|||
private Integer money; |
|||
private Integer moneyFree; |
|||
private Integer moneyBuy; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date startTime; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date endTime; |
|||
private String sortField; |
|||
private String sortOrder; |
|||
private String ipAddress; |
|||
private String time; |
|||
|
|||
} |
@ -1,30 +0,0 @@ |
|||
package com.example.demo.domain.dou; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class RechargeTotal { |
|||
private String token; |
|||
private Integer jwcode; |
|||
private String OrderNo; |
|||
private String type; |
|||
private BigDecimal priceTotal; |
|||
private Integer countTotal; |
|||
private String payStyle; |
|||
private String deptName; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date startTime; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date endTime; |
|||
} |
@ -1,26 +0,0 @@ |
|||
package com.example.demo.domain.dou; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class Records implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
private Integer id; |
|||
private Integer uid; |
|||
private Integer money; |
|||
private Integer moneyFree; |
|||
private Integer moneyBuy; |
|||
private Integer time; |
|||
private Integer type; |
|||
private Integer data; |
|||
private String jwcode; |
|||
private String token; |
|||
private String content ; |
|||
|
|||
} |
@ -1,17 +0,0 @@ |
|||
package com.example.demo.domain.dou; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class Searchinfo implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private String jwcode; |
|||
private String token; |
|||
} |
@ -1,41 +0,0 @@ |
|||
package com.example.demo.domain.dou; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class Spend implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private String jwcode; |
|||
private String nickname; |
|||
private String ipAddress; |
|||
private Integer jinbi; |
|||
private Integer jinbiFree; |
|||
private Integer jinbiBuy; |
|||
private Integer jinbiCostTotal; |
|||
private String token; |
|||
private String sortField; |
|||
private String sortOrder; |
|||
private String sourceName; |
|||
private String content; |
|||
private Integer payType; |
|||
private Integer good; |
|||
private Integer createTime; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date startTime; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date endTime; |
|||
private String room; |
|||
private Integer sourceType; |
|||
} |
@ -1,37 +0,0 @@ |
|||
package com.example.demo.domain.dou; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class SpendTotal { |
|||
private String token; |
|||
private Integer SpendTotal; |
|||
private String jwcode; |
|||
private String nickname; |
|||
private String ipAddress; |
|||
private Integer jinbi; |
|||
private Integer jinbiFree; |
|||
private Integer jinbiBuy; |
|||
private Integer jinbiCostTotal; |
|||
private String sortField; |
|||
private String sortOrder; |
|||
private String sourceName; |
|||
private String content; |
|||
private Integer payType; |
|||
private Integer sourceType; |
|||
private Integer time; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date startTime; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date endTime; |
|||
} |
@ -1,28 +0,0 @@ |
|||
package com.example.demo.domain.dou; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class Total { |
|||
private String token; |
|||
private String jwcode; |
|||
private String orderNo; |
|||
private String type; |
|||
private String ipAddress; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date startTime; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date endTime; |
|||
private Integer count; |
|||
private Integer price; |
|||
} |
@ -1,28 +0,0 @@ |
|||
package com.example.demo.domain.dou; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class Yve implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private String jwcode; |
|||
private String nickname; |
|||
private String ipAddress; |
|||
private Integer jinbi; |
|||
private Integer jinbiFree; |
|||
private Integer jinbiBuy; |
|||
private Integer jinbiCostTotal; |
|||
private Integer jinbiCostbeenTotal; |
|||
private Integer jinbifreebeenTotal; |
|||
private String token; |
|||
private String sortField; |
|||
private String sortOrder; |
|||
} |
@ -1,17 +0,0 @@ |
|||
package com.example.demo.domain.dou; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class YveTotal { |
|||
private Integer jinbiBuy; |
|||
private Integer jinbiCostTotal; |
|||
private Integer jinbiFree; |
|||
private String token; |
|||
private String ipAddress; |
|||
private String jwcode; |
|||
} |
@ -1,59 +0,0 @@ |
|||
package com.example.demo.domain.entity; |
|||
|
|||
|
|||
|
|||
import com.example.demo.config.LocalDateTimeDeserializer; |
|||
import com.example.demo.config.LocalDateTimeSerializer; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize; |
|||
import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
|||
import lombok.Data; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDate; |
|||
import java.time.LocalDateTime; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
public class Activity implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
private Integer activityId; |
|||
private Integer adminId; |
|||
private String dept; |
|||
|
|||
@JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", timezone = "Asia/Shanghai") |
|||
|
|||
private Date startTime; |
|||
|
|||
@JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", timezone = "Asia/Shanghai") |
|||
|
|||
private Date endTime; |
|||
|
|||
private String activityName; |
|||
private BigDecimal rechargeRatio; |
|||
|
|||
@JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date createTime; |
|||
|
|||
private Integer activityFlag; |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private String name; |
|||
private Integer status; |
|||
|
|||
|
|||
private Date startDate; |
|||
|
|||
|
|||
private Date endDate; |
|||
|
|||
|
|||
private String token; // 新增的token字段 |
|||
|
|||
|
|||
|
|||
private String adminName; |
|||
private String freeGold; |
|||
} |
@ -1,160 +0,0 @@ |
|||
//package com.example.demo.domain.entity; |
|||
// |
|||
//import com.fasterxml.jackson.annotation.JsonFormat; |
|||
//import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
//import lombok.Data; |
|||
//import lombok.NoArgsConstructor; |
|||
//import org.springframework.format.annotation.DateTimeFormat; |
|||
//import org.springframework.security.core.GrantedAuthority; |
|||
//import org.springframework.security.core.authority.SimpleGrantedAuthority; |
|||
//import org.springframework.security.core.userdetails.UserDetails; |
|||
// |
|||
//import java.io.Serializable; |
|||
//import java.util.*; |
|||
// |
|||
//@Data |
|||
//@NoArgsConstructor |
|||
//public class Admin implements UserDetails, Serializable { |
|||
// private Integer adminId; |
|||
// private String name; |
|||
// private String username; |
|||
// private String password; |
|||
// private String permission; |
|||
// private String area; |
|||
// private String adminFlag; |
|||
// private String store; |
|||
// private String token; |
|||
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
// @DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
// private Date createTime; |
|||
// private String jwcode; |
|||
// @Override |
|||
// @JsonIgnore |
|||
// public Collection<? extends GrantedAuthority> getAuthorities() { |
|||
// Set<GrantedAuthority> authorities = new HashSet<>(); |
|||
// if (permission != null) { |
|||
// int permValue = permission.intValue(); |
|||
// if (permValue == 1) { |
|||
// authorities.add(new SimpleGrantedAuthority("ROLE_SUPER_ADMIN")); |
|||
// } else if (permValue == 2) { |
|||
// authorities.add(new SimpleGrantedAuthority("ROLE_ADMIN")); |
|||
// } else if (permValue == 3) { |
|||
// authorities.add(new SimpleGrantedAuthority("ROLE_AUDITORS")); |
|||
// } |
|||
// } |
|||
// return authorities; |
|||
// } |
|||
// @Override |
|||
// @JsonIgnore |
|||
// public boolean isAccountNonExpired() { |
|||
// return UserDetails.super.isAccountNonExpired(); |
|||
// } |
|||
// |
|||
// @Override |
|||
// @JsonIgnore |
|||
// public boolean isAccountNonLocked() { |
|||
// return UserDetails.super.isAccountNonLocked(); |
|||
// } |
|||
// |
|||
// @Override |
|||
// @JsonIgnore |
|||
// public boolean isCredentialsNonExpired() { |
|||
// return UserDetails.super.isCredentialsNonExpired(); |
|||
// } |
|||
// |
|||
// @Override |
|||
// @JsonIgnore |
|||
// public boolean isEnabled() { |
|||
// return UserDetails.super.isEnabled(); |
|||
// } |
|||
//} |
|||
// |
|||
package com.example.demo.domain.entity; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
import org.springframework.security.core.GrantedAuthority; |
|||
import org.springframework.security.core.authority.SimpleGrantedAuthority; |
|||
import org.springframework.security.core.userdetails.UserDetails; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.*; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
public class Admin implements UserDetails, Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
private Integer adminId; |
|||
private String name; |
|||
private String username; |
|||
private String password; |
|||
private String permission; |
|||
private String area; |
|||
private String adminFlag; |
|||
private String store; |
|||
private String token; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date createTime; |
|||
private String jwcode; |
|||
private Integer status1; |
|||
private String remark; |
|||
|
|||
private String machineId; |
|||
|
|||
|
|||
@Override |
|||
@JsonIgnore |
|||
public Collection<? extends GrantedAuthority> getAuthorities() { |
|||
Set<GrantedAuthority> authorities = new HashSet<>(); |
|||
Optional.ofNullable(permission) |
|||
.map(Integer::valueOf) |
|||
.ifPresent(permValue -> { |
|||
switch (permValue) { |
|||
case 1: |
|||
authorities.add(new SimpleGrantedAuthority("ROLE_SUPER_ADMIN")); |
|||
break; |
|||
case 2: |
|||
authorities.add(new SimpleGrantedAuthority("ROLE_ADMIN")); |
|||
break; |
|||
case 3: |
|||
authorities.add(new SimpleGrantedAuthority("ROLE_AUDITORS")); |
|||
break; |
|||
case 5: |
|||
authorities.add(new SimpleGrantedAuthority("Branch_Manager")); |
|||
break; |
|||
default: |
|||
// 可以添加默认角色或处理未知权限 |
|||
break; |
|||
} |
|||
}); |
|||
return authorities; |
|||
} |
|||
|
|||
@Override |
|||
@JsonIgnore |
|||
public boolean isAccountNonExpired() { |
|||
return true; // 默认账户未过期 |
|||
} |
|||
|
|||
@Override |
|||
@JsonIgnore |
|||
public boolean isAccountNonLocked() { |
|||
return true; // 默认账户未锁定 |
|||
} |
|||
|
|||
@Override |
|||
@JsonIgnore |
|||
public boolean isCredentialsNonExpired() { |
|||
return true; // 默认凭证未过期 |
|||
} |
|||
|
|||
@Override |
|||
@JsonIgnore |
|||
public boolean isEnabled() { |
|||
return status1 != null && status1 == 1; |
|||
} |
|||
} |
@ -1,56 +0,0 @@ |
|||
package com.example.demo.domain.entity; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@JsonIgnoreProperties(ignoreUnknown = true) |
|||
public class Audit implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Integer auditId; |
|||
private String jwcode; |
|||
private Integer rechargeId; |
|||
private Integer refundId; |
|||
private Integer adminId; |
|||
private Integer status; |
|||
private Integer AuditFlag; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date createTime; |
|||
private Date startDate; |
|||
private Date endDate; |
|||
private String reson; |
|||
private Integer detailId; |
|||
private String token; |
|||
private Recharge recharge; |
|||
private BigDecimal freeGold; |
|||
private BigDecimal paidGold; |
|||
|
|||
private BigDecimal rechargeGold; |
|||
private Integer activityId; |
|||
private String activityName; |
|||
private String area; |
|||
private Integer flag; |
|||
private String name; |
|||
private String payWay; |
|||
private String remark; |
|||
private String username; |
|||
private String orderCode; |
|||
private String rechargeWay; |
|||
private String rechargeVoucher; |
|||
private String rechargeTime; |
|||
private String adminName; |
|||
|
|||
private String sortField; |
|||
private String sortOrder; |
|||
|
|||
} |
@ -1,78 +0,0 @@ |
|||
package com.example.demo.domain.entity; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
public class Detail implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
private Integer detailId; |
|||
private Integer detailyId; |
|||
private String name; |
|||
private String jwcode; |
|||
private String area; |
|||
private Integer activityId; |
|||
private String rechargeWay; |
|||
private Integer productId; |
|||
private String consumePlatform; |
|||
private String consumeType; |
|||
private String refundType; |
|||
private String refundGoods; |
|||
private Integer contactId; |
|||
private String remark; |
|||
private BigDecimal rechargeCoin; |
|||
private BigDecimal freeCoin; |
|||
private BigDecimal taskCoin; |
|||
private Integer auditId; |
|||
private Integer adminId; |
|||
private Integer status; |
|||
private Integer updateType; |
|||
private Integer detailFlag; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date createTime; |
|||
private String username; |
|||
private Date endDate; |
|||
private Date startDate; |
|||
private String uname; |
|||
private Integer firstRecharge; |
|||
private String createAdmin; |
|||
private String adminArea; |
|||
private String adminName; |
|||
private String userName; |
|||
private String auditStatus; |
|||
private String auditReson; |
|||
private String orderCode; |
|||
private Integer refundFlag; |
|||
private String reson; |
|||
|
|||
// @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
// @DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private String productName; |
|||
private Integer refundId; |
|||
|
|||
private BigDecimal allCoin; |
|||
private String token; |
|||
|
|||
private BigDecimal free6; |
|||
private BigDecimal free12; |
|||
|
|||
private BigDecimal allGold; |
|||
private Integer typeR;//选择退款部分 |
|||
|
|||
private String sortField; |
|||
private String sortOrder; |
|||
private List<String> areas; |
|||
|
|||
|
|||
} |
@ -1,90 +0,0 @@ |
|||
package com.example.demo.domain.entity; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@JsonIgnoreProperties(ignoreUnknown = true) |
|||
public class DetailY implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
private Integer detailyId; |
|||
private String name; |
|||
private String jwcode; |
|||
private String area; |
|||
private Integer activityId; |
|||
private String rechargeWay; |
|||
private Integer productId; |
|||
private String consumePlatform; |
|||
private String consumeType; |
|||
private String refundType; |
|||
private String refundGoods; |
|||
private Integer contactId; |
|||
private String remark; |
|||
private BigDecimal rechargeCoin; |
|||
private BigDecimal freeCoin; |
|||
private BigDecimal taskCoin; |
|||
private BigDecimal gold; |
|||
|
|||
private Integer adminId; |
|||
private Integer status; |
|||
private Integer updateType; |
|||
private Integer detailFlag; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
private Date createTime; |
|||
|
|||
private Date endDate; |
|||
private Date startDate; |
|||
private String uname; |
|||
private Integer firstRecharge; |
|||
|
|||
private String adminArea; |
|||
private String adminName; |
|||
private String username; |
|||
private String auditStatus; |
|||
private String auditReson; |
|||
private String orderCode; |
|||
private Integer refundFlag; |
|||
private Integer gtype; |
|||
|
|||
private List<Integer> updateTypes; |
|||
|
|||
// @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
// @DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private String productName; |
|||
private Integer refundId; |
|||
|
|||
private BigDecimal allCoin; |
|||
private String token; |
|||
|
|||
private BigDecimal free6; |
|||
private BigDecimal free12; |
|||
|
|||
private BigDecimal allGold; |
|||
private String ActivityName; |
|||
private Integer flag; |
|||
private String reson; |
|||
private BigDecimal sumR; |
|||
private BigDecimal sumF; |
|||
private BigDecimal sumT; |
|||
|
|||
private String sortField; |
|||
private String sortOrder; |
|||
|
|||
private String num; |
|||
|
|||
private List<String> areas; |
|||
|
|||
private String uid; |
|||
private BigDecimal gold_last; |
|||
|
|||
} |
@ -1,24 +0,0 @@ |
|||
package com.example.demo.domain.entity; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class Index implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
private Integer indexId; |
|||
private BigDecimal price; |
|||
private String name; |
|||
private String remark; |
|||
private Integer type; |
|||
private Integer productFlag; |
|||
private Date createTime; |
|||
private String token; |
|||
} |
@ -1,14 +0,0 @@ |
|||
package com.example.demo.domain.entity; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
public class Permission implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
private Integer permissionId; |
|||
private String permissionName; |
|||
} |
@ -1,27 +0,0 @@ |
|||
package com.example.demo.domain.entity; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
public class Product implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private int productId; |
|||
private BigDecimal price; |
|||
private String name; |
|||
private String remark; |
|||
private Integer type; |
|||
private Integer productFlag; |
|||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private LocalDateTime createTime; |
|||
private String token; |
|||
|
|||
} |
@ -1,38 +0,0 @@ |
|||
package com.example.demo.domain.entity; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
public class Rate implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Integer rateId; |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date startTime; |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date endTime; |
|||
private String currency; |
|||
private BigDecimal exchangeRate; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date createTime; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date updateTime; |
|||
private Integer adminId; |
|||
private String adminName; |
|||
private Integer flag; |
|||
private String token; |
|||
private Integer updateId; |
|||
private Integer status; |
|||
} |
@ -1,51 +0,0 @@ |
|||
package com.example.demo.domain.entity; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@JsonIgnoreProperties(ignoreUnknown = true) |
|||
public class Recharge implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private String Rate; |
|||
private Integer rechargeId; |
|||
private String jwcode; |
|||
private Integer activityId; |
|||
private BigDecimal paidGold; |
|||
private BigDecimal freeGold; |
|||
private BigDecimal rechargeGold; |
|||
private String payWay; |
|||
private String rechargeWay; |
|||
private Date rechargeTime; |
|||
private String rechargeVoucher; |
|||
private Integer adminId; |
|||
private String area; |
|||
private String rechargeRatio; |
|||
private String remark; |
|||
private Integer flag; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date createTime; |
|||
private Date startDate; |
|||
private Date endDate; |
|||
private String orderCode; |
|||
private String token; |
|||
private Integer rateId; |
|||
private Integer line; |
|||
private String showInput; |
|||
private String imageUrl; |
|||
private String isInputInvalid; |
|||
private String inputErrorMessage; |
|||
|
|||
private String adminName; |
|||
|
|||
} |
@ -1,40 +0,0 @@ |
|||
package com.example.demo.domain.entity; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
public class User implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Integer userId; |
|||
private String name; |
|||
private String jwcode; |
|||
private String password; |
|||
private String phone; |
|||
private String email; |
|||
private String gender; |
|||
private String area; |
|||
private Date birthday; |
|||
private String head; |
|||
private Integer UserFlag; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date createTime; |
|||
private String signature; |
|||
private BigDecimal sumgold; |
|||
private BigDecimal buyJb; |
|||
private BigDecimal coreJb; |
|||
private BigDecimal free6; |
|||
private BigDecimal free12; |
|||
private Date lastTime; |
|||
private String token; |
|||
|
|||
} |
@ -1,53 +0,0 @@ |
|||
package com.example.demo.domain.entity; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
import com.alibaba.excel.annotation.write.style.ColumnWidth; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
|
|||
public class UserDetailExport { |
|||
@ExcelProperty("用户序号") |
|||
@ColumnWidth(20) |
|||
private int Id; |
|||
@ExcelProperty("用户名") |
|||
@ColumnWidth(20) |
|||
private String Name; |
|||
@ExcelProperty("精网号") |
|||
@ColumnWidth(20) |
|||
private String jwcode; |
|||
@ExcelProperty("所属地区") |
|||
@ColumnWidth(20) |
|||
private String area; |
|||
@ExcelProperty("平台信息") |
|||
@ColumnWidth(20) |
|||
private String consumePlatform; |
|||
@ExcelProperty("更新数量") |
|||
@ColumnWidth(20) |
|||
private BigDecimal gold; |
|||
@ExcelProperty("更新类型") |
|||
@ColumnWidth(20) |
|||
private Integer updateType; |
|||
|
|||
@ExcelProperty("充值金币") |
|||
@ColumnWidth(20) |
|||
private BigDecimal rechargeCoin; |
|||
@ExcelProperty("免费金币") |
|||
@ColumnWidth(20) |
|||
private BigDecimal freeCoin; |
|||
@ExcelProperty("任务金币") |
|||
@ColumnWidth(20) |
|||
private BigDecimal taskCoin; |
|||
@ExcelProperty("提交人") |
|||
@ColumnWidth(20) |
|||
private String createAdmin; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date createTime; |
|||
} |
@ -1,31 +0,0 @@ |
|||
package com.example.demo.domain.entity; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
public class UserGold implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
|
|||
private String jwcode; |
|||
private Date createTime; |
|||
private String signature; |
|||
private BigDecimal sumgold; |
|||
private BigDecimal buyJb; |
|||
private BigDecimal coreJb; |
|||
private BigDecimal free6; |
|||
private BigDecimal free12; |
|||
private Date addTime; |
|||
private Date lastTime; |
|||
private String token; |
|||
} |
@ -1,59 +0,0 @@ |
|||
package com.example.demo.domain.vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
public class ConsumeDetail implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Integer detailId; |
|||
private String name; |
|||
private String jwcode; |
|||
private String area; |
|||
private String uarea; |
|||
private Integer activityId; |
|||
private String rechargeWay; |
|||
private String goods; |
|||
private String consumePlatform; |
|||
private String consumeType; |
|||
private String refundType; |
|||
private String refundGoods; |
|||
private Integer contactId; |
|||
private String remark; |
|||
private BigDecimal rechargeCoin; |
|||
private BigDecimal freeCoin; |
|||
private BigDecimal taskCoin; |
|||
private String conmmitName; |
|||
private Integer status; |
|||
private String updateType; |
|||
private Integer detailFlag; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date createTime; |
|||
private Integer adminId; |
|||
private String reson; |
|||
private String user; |
|||
private Date startDate; |
|||
private Date endDate; |
|||
private Integer auditId; |
|||
private String token; |
|||
private Integer refundId; |
|||
private String productName; |
|||
private String username; |
|||
|
|||
private String sortField; |
|||
private String sortOrder; |
|||
private List<String> areas; |
|||
|
|||
} |
@ -1,34 +0,0 @@ |
|||
package com.example.demo.domain.vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@AllArgsConstructor |
|||
@NoArgsConstructor |
|||
@JsonIgnoreProperties(ignoreUnknown = true) |
|||
public class DetailExport implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Integer updateType; |
|||
private String jwcode; |
|||
private String token; |
|||
private String area; |
|||
private List<String> areas; |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date startDate; |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date endDate; |
|||
|
|||
|
|||
} |
@ -1,61 +0,0 @@ |
|||
package com.example.demo.domain.vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDateTime; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
public class DetailVo implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Integer detailId; |
|||
private String name; |
|||
private String jwcode; |
|||
private String area; |
|||
private Integer activityId; |
|||
private String rechargeWay; |
|||
private String goods; |
|||
private String consumePlatform; |
|||
private String consumeType; |
|||
private String refundType; |
|||
private String refundGoods; |
|||
private Integer contactId; |
|||
private String remark; |
|||
private BigDecimal rechargeCoin; |
|||
private BigDecimal freeCoin; |
|||
private BigDecimal taskCoin; |
|||
private Integer adminId; |
|||
private Integer status; |
|||
private String updateType; |
|||
private Integer detailFlag; |
|||
// @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
// @DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private Date createTime; |
|||
|
|||
//搜索消费时间 |
|||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private Date searchStartTime; |
|||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private Date searchEndTime; |
|||
|
|||
//提交人姓名 |
|||
private String adminName; |
|||
|
|||
//消费金币总数 |
|||
private Integer totalCoin; |
|||
|
|||
// |
|||
private String productName; |
|||
private String userName; |
|||
private Date startDate; |
|||
private Date endDate; |
|||
private String token; |
|||
|
|||
} |
@ -1,59 +0,0 @@ |
|||
package com.example.demo.domain.vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
@Data |
|||
@NoArgsConstructor |
|||
public class DetailYVo implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Integer detailYId; |
|||
private String name; |
|||
private String jwcode; |
|||
private String area; |
|||
private Integer activityId; |
|||
private String rechargeWay; |
|||
private String goods; |
|||
private String consumePlatform; |
|||
private String consumeType; |
|||
private String refundType; |
|||
private String refundGoods; |
|||
private Integer contactId; |
|||
private String remark; |
|||
private BigDecimal rechargeCoin; |
|||
private BigDecimal freeCoin; |
|||
private BigDecimal taskCoin; |
|||
private Integer adminId; |
|||
private Integer status; |
|||
private String updateType; |
|||
private Integer detailFlag; |
|||
// @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
|||
// @DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private Date createTime; |
|||
|
|||
//搜索消费时间 |
|||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private Date searchStartTime; |
|||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") |
|||
private Date searchEndTime; |
|||
|
|||
//提交人姓名 |
|||
private String adminName; |
|||
|
|||
//消费金币总数 |
|||
private Integer totalCoin; |
|||
|
|||
// |
|||
private String productName; |
|||
private String userName; |
|||
private Date startDate; |
|||
private Date endDate; |
|||
private String token; |
|||
} |
|||
|
@ -1,34 +0,0 @@ |
|||
package com.example.demo.domain.vo; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
public class DetailYgold implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private String name; |
|||
private String area; |
|||
private BigDecimal buyJb; |
|||
private BigDecimal coreJb; |
|||
private BigDecimal free12; |
|||
private BigDecimal free6; |
|||
private String jwcode; |
|||
private Integer Rcoin; |
|||
private Integer Scoin; |
|||
|
|||
|
|||
private BigDecimal SumbuyJb; |
|||
private BigDecimal SumcoreJb; |
|||
private BigDecimal Sumfree12; |
|||
private BigDecimal Sumfree6; |
|||
|
|||
private String sortField; |
|||
private String sortOrder; |
|||
private List<String> areas; |
|||
} |
@ -1,39 +0,0 @@ |
|||
package com.example.demo.domain.vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@JsonIgnoreProperties(ignoreUnknown = true) |
|||
public class ERP implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private String jwcode; |
|||
private BigDecimal taskJb; |
|||
private BigDecimal freeJb; |
|||
private BigDecimal rechargeJb; |
|||
private String adminName; |
|||
private String productName; |
|||
private String reamrk; |
|||
private String type; |
|||
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
private Date createTime; |
|||
private String consumePlatform; |
|||
private String name; |
|||
private Integer consumeType ; |
|||
private Integer refundType; |
|||
private String refundGoods; |
|||
private Integer updateType; |
|||
private String area; |
|||
private String token; |
|||
|
|||
private Table table; |
|||
|
|||
} |
@ -1,53 +0,0 @@ |
|||
package com.example.demo.domain.vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonAnySetter; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonInclude; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDate; |
|||
import java.time.LocalDateTime; |
|||
import java.util.Date; |
|||
import java.util.HashMap; |
|||
import java.util.Map; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
|
|||
public class Meium implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
//中间-11个月 每月充值金币 |
|||
private BigDecimal rechargeSumCoin; |
|||
//中间-11个月 每月免费金币 |
|||
private BigDecimal freeSumCoin; |
|||
//中间-11个月 每月任务金币 |
|||
private BigDecimal taskSumCoin; |
|||
private String area; |
|||
private String store; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private BigDecimal totalRechargeSum; |
|||
private Date searchStartTime; |
|||
private Date searchEndTime; |
|||
private Integer updateType; |
|||
private String type; |
|||
private String token; // 新增的token字段 |
|||
private String jwcode; |
|||
// 如果有更多的未知字段,可以使用@JsonAnySetter来捕获它们 |
|||
private Map<String, Object> additionalProperties = new HashMap<>(); |
|||
|
|||
private String day; |
|||
|
|||
private String sortField; |
|||
private String sortOrder; |
|||
|
|||
@JsonAnySetter |
|||
public void setAdditionalProperty(String name, Object value) { |
|||
this.additionalProperties.put(name, value); |
|||
} |
|||
|
|||
} |
@ -1,40 +0,0 @@ |
|||
package com.example.demo.domain.vo; |
|||
|
|||
|
|||
import com.example.demo.domain.dou.Pay; |
|||
import com.example.demo.domain.dou.Spend; |
|||
import com.example.demo.domain.dou.Yve; |
|||
import com.example.demo.domain.entity.*; |
|||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@JsonIgnoreProperties(ignoreUnknown = true) |
|||
public class Page implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
private Integer pageNum; |
|||
private Integer pageSize; |
|||
|
|||
private RechargeVo rechargeVo; |
|||
private Activity activity; |
|||
private Rate rate; |
|||
private Audit audit; |
|||
private ConsumeDetail consumeDetail; |
|||
private Detail detail; |
|||
private DetailVo detailVo; |
|||
private Admin admin; |
|||
private DetailY detailY; |
|||
private DetailYVo detailYVo; |
|||
private DetailYgold detailYgold; |
|||
private Yve yve; |
|||
private Pay pay; |
|||
private Spend spend; |
|||
|
|||
} |
|||
|
|||
|
@ -1,37 +0,0 @@ |
|||
package com.example.demo.domain.vo; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class RechargeA implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
private Integer Raudit; |
|||
private BigDecimal SumRaudit; |
|||
private BigDecimal SumRaudit1; |
|||
private BigDecimal SumRaudit2; |
|||
|
|||
private String flag; |
|||
|
|||
private List<Integer> flags; |
|||
private String token; |
|||
|
|||
private String jwcode; |
|||
private String activityId; |
|||
private Integer adminId; |
|||
private Date startDate; |
|||
private Date endDate; |
|||
private String payWay; |
|||
private String rechargeWay; |
|||
private String area; |
|||
private String auditStatus; |
|||
private List<String> areas; |
|||
} |
@ -1,59 +0,0 @@ |
|||
package com.example.demo.domain.vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.io.Serializable; // 引入 Serializable |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
public class RechargeVo implements Serializable { // 实现 Serializable 接口 |
|||
|
|||
private static final long serialVersionUID = 1L; // 添加 serialVersionUID |
|||
|
|||
private Integer rechargeId; |
|||
private String jwcode; |
|||
private Integer activityId; |
|||
private BigDecimal paidGold; |
|||
private BigDecimal freeGold; |
|||
private BigDecimal rechargeGold; |
|||
private String payWay; |
|||
private String rechargeWay; |
|||
private Date rechargeTime; |
|||
private String rechargeVoucher; |
|||
private Integer adminId; |
|||
private String area; |
|||
private String remark; |
|||
private Integer flag; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date createTime; |
|||
private Date startDate; |
|||
private Date endDate; |
|||
private String username; |
|||
private String activityName; |
|||
private Integer status; |
|||
private String reson; |
|||
private String name; |
|||
private Integer auditId; |
|||
private String token; |
|||
|
|||
private Integer detailId; |
|||
private String orderCode; |
|||
|
|||
private String adminName; |
|||
|
|||
private String sortField; |
|||
private String sortOrder; |
|||
|
|||
private List<String> areas; // List 类型默认是可序列化的 |
|||
|
|||
// 如果有任何不需要序列化的字段,可以使用 transient 关键字 |
|||
// private transient SomeNonSerializableType nonSerializableField; |
|||
} |
@ -1,45 +0,0 @@ |
|||
package com.example.demo.domain.vo; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class RefundA implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
private Integer Raudit; |
|||
private BigDecimal SumRaudit; |
|||
private BigDecimal SumRaudit1; |
|||
private BigDecimal SumRaudit2; |
|||
private BigDecimal SumRaudit3; |
|||
|
|||
|
|||
private String flag; |
|||
|
|||
private List<Integer> flags; |
|||
private String token; |
|||
|
|||
private String jwcode; |
|||
private String activityId; |
|||
private Integer adminId; |
|||
private Date startDate; |
|||
private Date endDate; |
|||
private String payWay; |
|||
private String rechargeWay; |
|||
private String area; |
|||
private String status; |
|||
private String refundType; |
|||
private String refundGoods; |
|||
|
|||
private String category; |
|||
private BigDecimal amount; |
|||
private List<String> areas; |
|||
|
|||
} |
@ -1,48 +0,0 @@ |
|||
package com.example.demo.domain.vo; |
|||
|
|||
import com.fasterxml.jackson.core.JsonProcessingException; |
|||
import com.fasterxml.jackson.databind.ObjectMapper; |
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class Result implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
private Integer code; |
|||
private String msg; |
|||
private Object data; |
|||
|
|||
public static Result success(Integer code, String msg, Object data) { |
|||
return new Result(code, msg, data); |
|||
} |
|||
public static Result success(Integer code, Object data) { |
|||
return success(code, "操作成功", data); |
|||
} |
|||
public static Result success(String msg, Object data) {return success(200, msg, data);} |
|||
public static Result success(Object data){ |
|||
return success(200, data); |
|||
} |
|||
public static Result success(){ |
|||
return success(null); |
|||
} |
|||
|
|||
public static Result error(Integer code, String msg, Object data){ |
|||
return new Result(code, msg, data); |
|||
} |
|||
public static Result error(Integer code, String msg){ |
|||
return error(code, msg, null); |
|||
} |
|||
public static Result error(String msg){ |
|||
return error(0, msg); |
|||
} |
|||
|
|||
public String toJson() throws JsonProcessingException { |
|||
ObjectMapper mapper = new ObjectMapper(); |
|||
return mapper.writeValueAsString(this); |
|||
} |
|||
} |
@ -1,55 +0,0 @@ |
|||
package com.example.demo.domain.vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonInclude; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
|
|||
|
|||
public class Statistics implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
private BigDecimal rechargeSumCoin; |
|||
private BigDecimal free6SumCoin; |
|||
private BigDecimal free12SumCoin; |
|||
private BigDecimal freeSumCoin; |
|||
private BigDecimal taskSumCoin; |
|||
private BigDecimal totalSumCoin; |
|||
private BigDecimal rechargeYesterdaySumCoin; |
|||
private BigDecimal freeYesterdaySumCoin; |
|||
private BigDecimal taskYesterdaySumCoin; |
|||
private BigDecimal totalYesterdaySumCoin; |
|||
private Integer rechargeCount; |
|||
private Integer rechargeCountThisWeek ; |
|||
private Integer rechargeCountLastWeek ; |
|||
private BigDecimal weekOverWeekRate; |
|||
private Integer rechargeCountToday; |
|||
private Integer rechargeCountYesterday; |
|||
private BigDecimal dayOverDayRate; |
|||
private BigDecimal totalCoinSystemSum; |
|||
private BigDecimal totalERPSum; |
|||
private BigDecimal totalHomilyChartSum; |
|||
private BigDecimal totalHomilyLinkSum; |
|||
private BigDecimal rechargeCoinSystemSum; |
|||
private BigDecimal freeCoinSystemSum; |
|||
private BigDecimal taskCoinSystemSum; |
|||
private BigDecimal rechargeERPSum; |
|||
private BigDecimal freeERPSum; |
|||
private BigDecimal taskERPSum; |
|||
private BigDecimal rechargeHomilyChartSum; |
|||
private BigDecimal freeHomilyChartSum; |
|||
private BigDecimal taskHomilyChartSum; |
|||
private BigDecimal rechargeHomilyLinkSum; |
|||
private BigDecimal freeHomilyLinkSum; |
|||
private BigDecimal taskHomilyLinkSum; |
|||
private String subject; |
|||
private String consumePlatform; |
|||
private Integer firstRechargeCountYesterday; |
|||
private String token; |
|||
|
|||
|
|||
} |
@ -1,25 +0,0 @@ |
|||
package com.example.demo.domain.vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonInclude; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
|
|||
|
|||
public class Statisticss implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private List<Statistics> CoinSystemSum; |
|||
private List<Statistics> ERPSum; |
|||
private List<Statistics> HomilyChartSum; |
|||
private List<Statistics> HomilyLinkSum; |
|||
|
|||
private String token; |
|||
|
|||
} |
@ -1,99 +0,0 @@ |
|||
package com.example.demo.domain.vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonInclude; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.time.LocalDate; |
|||
import java.time.LocalDateTime; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
|
|||
public class SumCoin implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
private List<String> areas; |
|||
|
|||
//当前金币余量 充值金币 |
|||
private BigDecimal todayRecharge; |
|||
//当前金币余量 免费金币 |
|||
private BigDecimal todayFree; |
|||
//当前金币余量 任务金币 |
|||
private BigDecimal todayTask; |
|||
//当前金币余量 总金币 |
|||
private BigDecimal todayTotalCoin; |
|||
//前一天金币余量 充值金币 |
|||
private BigDecimal yesterdayRecharge; |
|||
//前一天金币余量 免费金币 |
|||
private BigDecimal yesterdayFree; |
|||
//前一天金币余量 任务金币 |
|||
private BigDecimal yesterdayTask; |
|||
//前一天金币余量 总金币 |
|||
private BigDecimal yesterdayTotalCoin; |
|||
//当前金币余量与前一天金币余量之差 |
|||
private BigDecimal coinDifference; |
|||
|
|||
|
|||
//全年累计消耗金币数 消费总数 |
|||
private BigDecimal yearConsumeCoin; |
|||
//全年累计消耗金币数 退款金币 |
|||
private BigDecimal yearRefundCoin; |
|||
//全年累计消耗金币数 消耗总金币 |
|||
private BigDecimal yearsumCoin; |
|||
|
|||
|
|||
//全年累计消耗金币数--昨日新增消耗 消费金币 |
|||
private BigDecimal dayConsumeCoin; |
|||
//全年累计消耗金币数--昨日新增消耗 退款总金币 |
|||
private BigDecimal dayRefundCoin; |
|||
//全年累计消耗金币数--昨日新增消耗 消耗总金币 |
|||
private BigDecimal daysumCoin; |
|||
|
|||
|
|||
//全年累计消耗金币数--下面 消耗充值金币 |
|||
private BigDecimal yearSumRechargeCoin; |
|||
//全年累计消耗金币数--下面 消耗免费金币 |
|||
private BigDecimal yearSumFreeCoin; |
|||
//全年累计消耗金币数--下面 消耗任务金币 |
|||
private BigDecimal yearSumTaskCoin; |
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date searchStartTime; |
|||
|
|||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private Date searchEndTime; |
|||
private Integer updateType; |
|||
//中间-11个月 每月充值金币 |
|||
private BigDecimal rechargeSumCoin; |
|||
//中间-11个月 每月免费金币 |
|||
private BigDecimal freeSumCoin; |
|||
//中间-11个月 每月任务金币 |
|||
private BigDecimal taskSumCoin; |
|||
private String month; |
|||
private String dayofweek; |
|||
private String day; |
|||
|
|||
|
|||
private Integer jwcode; |
|||
private String area; |
|||
|
|||
|
|||
private BigDecimal totalRechargeRefund; |
|||
private BigDecimal totalTaskRefund; |
|||
private BigDecimal totalFreeRefund; |
|||
private BigDecimal totalRecharge; |
|||
private BigDecimal totalFree; |
|||
private BigDecimal totalTask; |
|||
private String token; |
|||
|
|||
// 识别年 |
|||
private Integer year; |
|||
|
|||
} |
@ -1,30 +0,0 @@ |
|||
package com.example.demo.domain.vo; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class SumConsume implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
private BigDecimal Sumcion; |
|||
private BigDecimal SumRcion; |
|||
private BigDecimal SumFcion; |
|||
private BigDecimal SumTcion; |
|||
private String jwcode; |
|||
private String consumePlatform; |
|||
private String consumeType; |
|||
private String productName; |
|||
private Date startDate; |
|||
private Date endDate; |
|||
private String token; |
|||
private String area; |
|||
private List<String> areas; |
|||
} |
@ -1,30 +0,0 @@ |
|||
package com.example.demo.domain.vo; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@AllArgsConstructor |
|||
public class SumDetailY implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
private BigDecimal sumR; |
|||
private BigDecimal sumT; |
|||
private BigDecimal sumF; |
|||
private List<Integer> updateTypes; |
|||
private String token; |
|||
private Date startDate; |
|||
private Date endDate; |
|||
private String area; |
|||
private String jwcode; |
|||
private Integer updateType; |
|||
private String consumePlatform; |
|||
private String types; |
|||
private List<String> areas; |
|||
} |
@ -1,33 +0,0 @@ |
|||
package com.example.demo.domain.vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
@JsonIgnoreProperties(ignoreUnknown = true) |
|||
public class Table implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
private Long id; |
|||
private String uid; |
|||
private BigDecimal gold_last; |
|||
private Integer gtype; |
|||
private String jwcode; |
|||
private BigDecimal free; |
|||
private BigDecimal core_jb; |
|||
private BigDecimal buy_jb; |
|||
private String cz_time; |
|||
private String cz_user; |
|||
private String cz_bz; |
|||
private Integer flag; |
|||
private Integer operation_type; |
|||
private Integer operation_platform; |
|||
private Integer operation_type_id; |
|||
private String goods_name; |
|||
|
|||
// Getters and setters |
|||
} |
@ -1,27 +0,0 @@ |
|||
package com.example.demo.domain.vo; |
|||
|
|||
import com.example.demo.domain.entity.Detail; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
public class UserConsumeCoin implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private String jwcode; |
|||
private BigDecimal free6; |
|||
private BigDecimal free12; |
|||
private BigDecimal rechargeSumCoin; |
|||
//中间-11个月 每月免费金币 |
|||
private BigDecimal freeSumCoin; |
|||
//中间-11个月 每月任务金币 |
|||
private BigDecimal taskSumCoin; |
|||
private BigDecimal allGold; |
|||
// |
|||
} |
@ -1,34 +0,0 @@ |
|||
package com.example.demo.domain.vo; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
import org.springframework.format.annotation.DateTimeFormat; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
@Data |
|||
@NoArgsConstructor |
|||
public class UserVo implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai") |
|||
@DateTimeFormat(pattern = "yyyy-MM-dd") |
|||
private String jwcode; |
|||
private String name; |
|||
private Date firstRechargeDate; |
|||
private BigDecimal totalRechargeGold; |
|||
private BigDecimal totalSpendGold; |
|||
private Integer rechargeTimes; |
|||
private Integer spendTimes; |
|||
private Integer pendingRechargeTimes; |
|||
private Integer pendingSpendTimes; |
|||
private BigDecimal free6; |
|||
private BigDecimal free12; |
|||
private BigDecimal coreJb; |
|||
private BigDecimal buyJb ; |
|||
private String area; |
|||
private String token; |
|||
|
|||
} |
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue