Merge branch 'master' of http://101.43.112.107:3000/root/ludu-cloud into zzw-one
This commit is contained in:
commit
ef9e00e2d9
226
.drone.yml
226
.drone.yml
@ -25,71 +25,142 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
|||||||
|
|
||||||
- mvn package -Dmaven.test.skip=true # 应用打包命令
|
- mvn package -Dmaven.test.skip=true # 应用打包命令
|
||||||
|
|
||||||
- mkdir -p /app/build/yudao-gateway/target
|
# - mkdir -p /app/build/yudao-gateway/target
|
||||||
- cp ./yudao-gateway/target/yudao-gateway.jar /app/build/yudao-gateway/target
|
# - cp ./yudao-gateway/target/yudao-gateway.jar /app/build/yudao-gateway/target
|
||||||
- cp ./yudao-gateway/Dockerfile /app/build/yudao-gateway
|
# - cp ./yudao-gateway/Dockerfile /app/build/yudao-gateway
|
||||||
- cp ./yudao-gateway/run.sh /app/build/yudao-gateway
|
# - cp ./yudao-gateway/run.sh /app/build/yudao-gateway
|
||||||
|
#
|
||||||
- mkdir -p /app/build/yudao-module-system/target
|
# - mkdir -p /app/build/yudao-module-system/target
|
||||||
- cp ./yudao-module-system/yudao-module-system-biz/target/yudao-module-system-biz.jar /app/build/yudao-module-system/target
|
# - cp ./yudao-module-system/yudao-module-system-biz/target/yudao-module-system-biz.jar /app/build/yudao-module-system/target
|
||||||
- cp ./yudao-module-system/yudao-module-system-biz/Dockerfile /app/build/yudao-module-system
|
# - cp ./yudao-module-system/yudao-module-system-biz/Dockerfile /app/build/yudao-module-system
|
||||||
- cp ./yudao-module-system/yudao-module-system-biz/run.sh /app/build/yudao-module-system
|
# - cp ./yudao-module-system/yudao-module-system-biz/run.sh /app/build/yudao-module-system
|
||||||
|
#
|
||||||
- mkdir -p /app/build/yudao-module-infra/target
|
# - mkdir -p /app/build/yudao-module-infra/target
|
||||||
- cp ./yudao-module-infra/yudao-module-infra-biz/target/yudao-module-infra-biz.jar /app/build/yudao-module-infra/target
|
# - cp ./yudao-module-infra/yudao-module-infra-biz/target/yudao-module-infra-biz.jar /app/build/yudao-module-infra/target
|
||||||
- cp ./yudao-module-infra/yudao-module-infra-biz/Dockerfile /app/build/yudao-module-infra
|
# - cp ./yudao-module-infra/yudao-module-infra-biz/Dockerfile /app/build/yudao-module-infra
|
||||||
- cp ./yudao-module-infra/yudao-module-infra-biz/run.sh /app/build/yudao-module-infra
|
# - cp ./yudao-module-infra/yudao-module-infra-biz/run.sh /app/build/yudao-module-infra
|
||||||
|
#
|
||||||
- mkdir -p /app/build/ludu-job-admin/target
|
# - mkdir -p /app/build/ludu-job-admin/target
|
||||||
- cp ./ludu-job-admin/ludu-job-admin-biz/target/ludu-job-admin-biz.jar /app/build/ludu-job-admin/target
|
# - cp ./ludu-job-admin/ludu-job-admin-biz/target/ludu-job-admin-biz.jar /app/build/ludu-job-admin/target
|
||||||
- cp ./ludu-job-admin/ludu-job-admin-biz/Dockerfile /app/build/ludu-job-admin
|
# - cp ./ludu-job-admin/ludu-job-admin-biz/Dockerfile /app/build/ludu-job-admin
|
||||||
- cp ./ludu-job-admin/ludu-job-admin-biz/run.sh /app/build/ludu-job-admin
|
# - cp ./ludu-job-admin/ludu-job-admin-biz/run.sh /app/build/ludu-job-admin
|
||||||
|
#
|
||||||
- mkdir -p /app/build/ludu-module-ticketing/target
|
# - mkdir -p /app/build/ludu-module-ticketing/target
|
||||||
- cp ./ludu-module-ticketing/ludu-module-ticketing-biz/target/ludu-module-ticketing-biz.jar /app/build/ludu-module-ticketing/target
|
# - cp ./ludu-module-ticketing/ludu-module-ticketing-biz/target/ludu-module-ticketing-biz.jar /app/build/ludu-module-ticketing/target
|
||||||
- cp ./ludu-module-ticketing/ludu-module-ticketing-biz/Dockerfile /app/build/ludu-module-ticketing
|
# - cp ./ludu-module-ticketing/ludu-module-ticketing-biz/Dockerfile /app/build/ludu-module-ticketing
|
||||||
- cp ./ludu-module-ticketing/ludu-module-ticketing-biz/run.sh /app/build/ludu-module-ticketing
|
# - cp ./ludu-module-ticketing/ludu-module-ticketing-biz/run.sh /app/build/ludu-module-ticketing
|
||||||
|
#
|
||||||
- mkdir -p /app/build/ludu-module-parking/target
|
# - mkdir -p /app/build/ludu-module-parking/target
|
||||||
- cp ./ludu-module-parking/ludu-module-parking-biz/target/ludu-module-parking-biz.jar /app/build/ludu-module-parking/target
|
# - cp ./ludu-module-parking/ludu-module-parking-biz/target/ludu-module-parking-biz.jar /app/build/ludu-module-parking/target
|
||||||
- cp ./ludu-module-parking/ludu-module-parking-biz/Dockerfile /app/build/ludu-module-parking
|
# - cp ./ludu-module-parking/ludu-module-parking-biz/Dockerfile /app/build/ludu-module-parking
|
||||||
- cp ./ludu-module-parking/ludu-module-parking-biz/run.sh /app/build/ludu-module-parking
|
# - cp ./ludu-module-parking/ludu-module-parking-biz/run.sh /app/build/ludu-module-parking
|
||||||
|
|
||||||
- mkdir -p /app/build/ludu-module-datacenter/target
|
- mkdir -p /app/build/ludu-module-datacenter/target
|
||||||
- cp ./ludu-module-datacenter/ludu-module-datacenter-biz/target/ludu-module-datacenter-biz.jar /app/build/ludu-module-datacenter/target
|
- cp ./ludu-module-datacenter/ludu-module-datacenter-biz/target/ludu-module-datacenter-biz.jar /app/build/ludu-module-datacenter/target
|
||||||
- cp ./ludu-module-datacenter/ludu-module-datacenter-biz/Dockerfile /app/build/ludu-module-datacenter
|
- cp ./ludu-module-datacenter/ludu-module-datacenter-biz/Dockerfile /app/build/ludu-module-datacenter
|
||||||
- cp ./ludu-module-datacenter/ludu-module-datacenter-biz/run.sh /app/build/ludu-module-datacenter
|
- cp ./ludu-module-datacenter/ludu-module-datacenter-biz/run.sh /app/build/ludu-module-datacenter
|
||||||
|
|
||||||
- name: build-infra-and-copy # 构建基础模块和复制票务停车场到轮渡服务器
|
- name: copy-to-object # 构建基础模块和复制票务停车场到轮渡服务器
|
||||||
|
|
||||||
image: appleboy/drone-ssh # SSH工具镜像
|
image: appleboy/drone-ssh # SSH工具镜像
|
||||||
|
|
||||||
settings:
|
settings:
|
||||||
|
|
||||||
host: 101.43.112.107 # 远程连接地址
|
host: 101.43.112.107 # 远程连接地址
|
||||||
|
|
||||||
username: root # 远程连接账号
|
username: root # 远程连接账号
|
||||||
|
|
||||||
password:
|
password:
|
||||||
|
|
||||||
from_secret: ssh_password # 从Secret中读取SSH密码
|
from_secret: ssh_password # 从Secret中读取SSH密码
|
||||||
|
|
||||||
port: 22 # 远程连接端口
|
port: 22 # 远程连接端口
|
||||||
|
|
||||||
command_timeout: 5m # 远程执行命令超时时间
|
command_timeout: 15m # 远程执行命令超时时间
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
|
||||||
|
- echo "start copy"
|
||||||
|
# - cd /ludu/maven
|
||||||
|
# - tar -cf ludu-build.tar ./build
|
||||||
|
# - scp ludu-build.tar root@121.36.203.133:/ludu/maven
|
||||||
|
# - scp -r /ludu/maven/build/yudao-gateway root@121.36.203.133:/ludu/maven/build
|
||||||
|
# - echo "gateway done"
|
||||||
|
# - scp -r /ludu/maven/build/yudao-module-system root@121.36.203.133:/ludu/maven/build
|
||||||
|
# - echo "system done"
|
||||||
|
# - scp -r /ludu/maven/build/ludu-module-ticketing root@121.36.203.133:/ludu/maven/build
|
||||||
|
# - echo "ticketing done"
|
||||||
|
# - scp -r /ludu/maven/build/ludu-module-parking root@121.36.203.133:/ludu/maven/build
|
||||||
|
# - echo "parking done"
|
||||||
|
# - scp -r /ludu/maven/build/yudao-module-infra root@121.36.203.133:/ludu/maven/build
|
||||||
|
# - echo "infra done"
|
||||||
|
# - scp -r /ludu/maven/build/ludu-job-admin root@121.36.203.133:/ludu/maven/build
|
||||||
|
# - echo "job done"
|
||||||
|
- scp -r /ludu/maven/build/ludu-module-datacenter root@120.46.37.243:/ludu/maven/build
|
||||||
|
- echo "datacenter done"
|
||||||
|
|
||||||
# - echo "start run.sh"
|
- name: build-other-service
|
||||||
|
|
||||||
|
image: appleboy/drone-ssh # SSH工具镜像
|
||||||
|
|
||||||
|
settings:
|
||||||
|
|
||||||
|
host: 120.46.37.243 # 远程连接地址
|
||||||
|
|
||||||
|
username: root # 远程连接账号
|
||||||
|
|
||||||
|
password:
|
||||||
|
|
||||||
|
from_secret: ssh_password2 # 从Secret中读取SSH密码
|
||||||
|
|
||||||
|
port: 22 # 远程连接端口
|
||||||
|
|
||||||
|
command_timeout: 5m # 远程执行命令超时时间
|
||||||
|
|
||||||
|
script:
|
||||||
|
|
||||||
|
- cd /ludu/maven/build/ludu-module-datacenter/
|
||||||
|
- chmod +x ./run.sh # 更改为可执行脚本
|
||||||
|
- ./run.sh || echo "ludu-module-datacenter build failed" # 运行脚本打包应用镜像并运行
|
||||||
|
# - name: object-build
|
||||||
|
#
|
||||||
|
# image: appleboy/drone-ssh # SSH工具镜像
|
||||||
|
#
|
||||||
|
# settings:
|
||||||
|
#
|
||||||
|
# host: 121.36.203.133 # 远程连接地址
|
||||||
|
#
|
||||||
|
# username: root # 远程连接账号
|
||||||
|
#
|
||||||
|
# password:
|
||||||
|
#
|
||||||
|
# from_secret: ssh_password3 # 从Secret中读取SSH密码
|
||||||
|
#
|
||||||
|
# port: 22 # 远程连接端口
|
||||||
|
#
|
||||||
|
# command_timeout: 20m # 远程执行命令超时时间
|
||||||
|
#
|
||||||
|
# script:
|
||||||
|
# - cd /ludu/maven
|
||||||
|
# - rm -rf ./build
|
||||||
|
# - tar -xf ludu-build.tar -C ./
|
||||||
|
#
|
||||||
# - cd /ludu/maven/build/yudao-gateway/
|
# - cd /ludu/maven/build/yudao-gateway/
|
||||||
# - chmod +x ./run.sh # 更改为可执行脚本
|
# - chmod +x ./run.sh # 更改为可执行脚本
|
||||||
# - ./run.sh || echo "yudao-gateway build failed" # 运行脚本打包应用镜像并运行
|
# - ./run.sh || echo "ludu-module-ticketing build failed" # 运行脚本打包应用镜像并运行
|
||||||
|
#
|
||||||
- cd /ludu/maven/build/yudao-module-system/
|
# - cd /ludu/maven/build/yudao-module-system/
|
||||||
- chmod +x ./run.sh # 更改为可执行脚本
|
# - chmod +x ./run.sh # 更改为可执行脚本
|
||||||
- ./run.sh || echo "yudao-module-system build failed" # 运行脚本打包应用镜像并运行
|
# - ./run.sh || echo "ludu-module-datacenter build failed" # 运行脚本打包应用镜像并运行
|
||||||
|
#
|
||||||
|
# - cd /ludu/maven/build/ludu-module-ticketing/
|
||||||
|
# - chmod +x ./run.sh # 更改为可执行脚本
|
||||||
|
# - ./run.sh || echo "ludu-module-ticketing build failed" # 运行脚本打包应用镜像并运行
|
||||||
|
#
|
||||||
|
# - cd /ludu/maven/build/ludu-module-parking/
|
||||||
|
# - chmod +x ./run.sh # 更改为可执行脚本
|
||||||
|
# - ./run.sh || echo "ludu-module-parking build failed" # 运行脚本打包应用镜像并运行
|
||||||
|
#
|
||||||
# - cd /ludu/maven/build/yudao-module-infra/
|
# - cd /ludu/maven/build/yudao-module-infra/
|
||||||
# - chmod +x ./run.sh # 更改为可执行脚本
|
# - chmod +x ./run.sh # 更改为可执行脚本
|
||||||
# - ./run.sh || echo "yudao-module-infra build failed" # 运行脚本打包应用镜像并运行
|
# - ./run.sh || echo "yudao-module-infra build failed" # 运行脚本打包应用镜像并运行
|
||||||
@ -98,65 +169,6 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行
|
|||||||
# - chmod +x ./run.sh # 更改为可执行脚本
|
# - chmod +x ./run.sh # 更改为可执行脚本
|
||||||
# - ./run.sh || echo "ludu-job-admin build failed" # 运行脚本打包应用镜像并运行
|
# - ./run.sh || echo "ludu-job-admin build failed" # 运行脚本打包应用镜像并运行
|
||||||
|
|
||||||
- cd /ludu/maven/build/ludu-module-datacenter/
|
|
||||||
- chmod +x ./run.sh # 更改为可执行脚本
|
|
||||||
- ./run.sh || echo "ludu-module-datacenter build failed" # 运行脚本打包应用镜像并运行
|
|
||||||
|
|
||||||
- cd /ludu/maven/build/ludu-module-ticketing/
|
|
||||||
- chmod +x ./run.sh # 更改为可执行脚本
|
|
||||||
- ./run.sh || echo "ludu-module-datacenter build failed" # 运行脚本打包应用镜像并运行
|
|
||||||
|
|
||||||
- cd /ludu/maven/build/ludu-module-parking/
|
|
||||||
- chmod +x ./run.sh # 更改为可执行脚本
|
|
||||||
- ./run.sh || echo "ludu-module-datacenter build failed" # 运行脚本打包应用镜像并运行
|
|
||||||
|
|
||||||
- echo "start copy"
|
|
||||||
- scp -r /ludu/maven/build/yudao-gateway root@120.46.37.243:/ludu/maven/build
|
|
||||||
- echo "gateway done"
|
|
||||||
|
|
||||||
# - echo "start copy"
|
|
||||||
# - scp -r /ludu/maven/build/ludu-module-ticketing root@120.46.37.243:/ludu/maven/build
|
|
||||||
# - echo "ticket done"
|
|
||||||
# - scp -r /ludu/maven/build/ludu-module-parking root@120.46.37.243:/ludu/maven/build
|
|
||||||
# - echo "park done"
|
|
||||||
# - scp -r /ludu/maven/build/ludu-module-datacenter root@120.46.37.243:/ludu/maven/build
|
|
||||||
# - echo "datecenter done"
|
|
||||||
|
|
||||||
- name: build-other-service
|
|
||||||
|
|
||||||
image: appleboy/drone-ssh # SSH工具镜像
|
|
||||||
|
|
||||||
settings:
|
|
||||||
|
|
||||||
host: 120.46.37.243 # 远程连接地址
|
|
||||||
|
|
||||||
username: root # 远程连接账号
|
|
||||||
|
|
||||||
password:
|
|
||||||
|
|
||||||
from_secret: ssh_password2 # 从Secret中读取SSH密码
|
|
||||||
|
|
||||||
port: 22 # 远程连接端口
|
|
||||||
|
|
||||||
command_timeout: 5m # 远程执行命令超时时间
|
|
||||||
|
|
||||||
script:
|
|
||||||
- cd /ludu/maven/build/yudao-gateway/
|
|
||||||
- chmod +x ./run.sh # 更改为可执行脚本
|
|
||||||
- ./run.sh || echo "ludu-module-ticketing build failed" # 运行脚本打包应用镜像并运行
|
|
||||||
|
|
||||||
# - cd /ludu/maven/build/ludu-module-ticketing/
|
|
||||||
# - chmod +x ./run.sh # 更改为可执行脚本
|
|
||||||
# - ./run.sh || echo "ludu-module-ticketing build failed" # 运行脚本打包应用镜像并运行
|
|
||||||
|
|
||||||
# - cd /ludu/maven/build/ludu-module-parking/
|
|
||||||
# - chmod +x ./run.sh # 更改为可执行脚本
|
|
||||||
# - ./run.sh || echo "ludu-module-parking build failed" # 运行脚本打包应用镜像并运行
|
|
||||||
|
|
||||||
# - cd /ludu/maven/build/ludu-module-datacenter/
|
|
||||||
# - chmod +x ./run.sh # 更改为可执行脚本
|
|
||||||
# - ./run.sh || echo "ludu-module-datacenter build failed" # 运行脚本打包应用镜像并运行
|
|
||||||
|
|
||||||
volumes: # 定义流水线挂载目录,用于共享数据
|
volumes: # 定义流水线挂载目录,用于共享数据
|
||||||
|
|
||||||
- name: maven-build
|
- name: maven-build
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性
|
FROM openjdk:8-jre
|
||||||
## 感谢复旦核博士的建议!灰子哥,牛皮!
|
|
||||||
FROM eclipse-temurin:8-jre
|
|
||||||
|
|
||||||
## 创建目录,并使用它作为工作目录
|
## 创建目录,并使用它作为工作目录
|
||||||
RUN mkdir -p /ludu-job-admin-biz
|
RUN mkdir -p /ludu-job-admin-biz
|
||||||
@ -11,10 +9,10 @@ COPY ./target/ludu-job-admin-biz.jar app.jar
|
|||||||
## 设置 TZ 时区
|
## 设置 TZ 时区
|
||||||
ENV TZ=Asia/Shanghai
|
ENV TZ=Asia/Shanghai
|
||||||
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
|
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
|
||||||
ENV JAVA_OPTS="-Xms512m -Xmx512m -Djava.security.egd=file:/dev/./urandom"
|
ENV JAVA_OPTS="-Xms256m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||||
|
|
||||||
## 暴露后端项目的 9090 端口
|
## 暴露后端项目的 9090 端口
|
||||||
EXPOSE 9090
|
EXPOSE 48084
|
||||||
|
|
||||||
## 启动后端项目
|
## 启动后端项目
|
||||||
CMD java ${JAVA_OPTS} -jar app.jar
|
CMD java ${JAVA_OPTS} -jar app.jar
|
||||||
|
@ -13,4 +13,4 @@ docker rmi ${app_name}:${app_version}
|
|||||||
echo '----build image----'
|
echo '----build image----'
|
||||||
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
|
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
|
||||||
echo '----start container----'
|
echo '----start container----'
|
||||||
docker run -d -p 9090:9090 --name ${app_name} ${app_name}:${app_version}
|
docker run -d -p 48084:9090 --name ${app_name} ${app_name}:${app_version}
|
@ -22,7 +22,7 @@ import java.nio.charset.StandardCharsets;
|
|||||||
@Component
|
@Component
|
||||||
public class OAuth2Client {
|
public class OAuth2Client {
|
||||||
|
|
||||||
private static final String BASE_URL = "http://127.0.0.1:48080/admin-api/system/oauth2";
|
private static final String BASE_URL = "https://mt.ptzykjgs.com/admin-api/system/oauth2";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 租户编号
|
* 租户编号
|
||||||
|
@ -21,7 +21,7 @@ import org.springframework.web.client.RestTemplate;
|
|||||||
@Component
|
@Component
|
||||||
public class UserClient {
|
public class UserClient {
|
||||||
|
|
||||||
private static final String BASE_URL = "http://127.0.0.1:48080/admin-api/system/oauth2/user";
|
private static final String BASE_URL = "https://mt.ptzykjgs.com/admin-api/system/oauth2/user";
|
||||||
|
|
||||||
// @Resource // 可优化,注册一个 RestTemplate Bean,然后注入
|
// @Resource // 可优化,注册一个 RestTemplate Bean,然后注入
|
||||||
private final RestTemplate restTemplate = new RestTemplate();
|
private final RestTemplate restTemplate = new RestTemplate();
|
||||||
|
@ -23,7 +23,7 @@ $(function(){
|
|||||||
title: I18n.system_tips,
|
title: I18n.system_tips,
|
||||||
content: ('已退出登录!' || I18n.logout_success)
|
content: ('已退出登录!' || I18n.logout_success)
|
||||||
});*/
|
});*/
|
||||||
window.location.href = "http://127.0.0.1:80/logout"
|
window.location.href = "https://mt.ptzykjgs.com/admin/logout"
|
||||||
/*$.post(base_url + "/logout", function(data, status) {
|
/*$.post(base_url + "/logout", function(data, status) {
|
||||||
if (data.code == "200") {
|
if (data.code == "200") {
|
||||||
layer.msg( I18n.logout_success );
|
layer.msg( I18n.logout_success );
|
||||||
|
@ -47,9 +47,9 @@
|
|||||||
*/
|
*/
|
||||||
function ssoLogin() {
|
function ssoLogin() {
|
||||||
const clientId = 'ludu-job-admin'; // 可以改写成,你的 clientId
|
const clientId = 'ludu-job-admin'; // 可以改写成,你的 clientId
|
||||||
const redirectUri = encodeURIComponent('http://127.0.0.1:9090/xxl-job-admin/toLogin'); // 注意,需要使用 encodeURIComponent 编码地址
|
const redirectUri = encodeURIComponent('https://mt.ptzykjgs.com/xxl-job-admin/toLogin'); // 注意,需要使用 encodeURIComponent 编码地址
|
||||||
const responseType = 'code'; // 1)授权码模式,对应 code;2)简化模式,对应 token
|
const responseType = 'code'; // 1)授权码模式,对应 code;2)简化模式,对应 token
|
||||||
window.location.href = 'http://127.0.0.1:80/sso?client_id=' + clientId
|
window.location.href = 'https://mt.ptzykjgs.com/admin/sso?client_id=' + clientId
|
||||||
+ '&redirect_uri=' + redirectUri
|
+ '&redirect_uri=' + redirectUri
|
||||||
+ '&response_type=' + responseType;
|
+ '&response_type=' + responseType;
|
||||||
}
|
}
|
||||||
@ -69,9 +69,9 @@
|
|||||||
ssoLogin();
|
ssoLogin();
|
||||||
} else {
|
} else {
|
||||||
// 提交
|
// 提交
|
||||||
const redirectUri = 'http://127.0.0.1:9090/xxl-job-admin/toLogin'; // 需要修改成,你回调的地址,就是在 index.html 拼接的 redirectUri
|
const redirectUri = 'https://mt.ptzykjgs.com/xxl-job-admin/toLogin'; // 需要修改成,你回调的地址,就是在 index.html 拼接的 redirectUri
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "http://127.0.0.1:9090/xxl-job-admin/auth/login-by-code?code=" + code
|
url: "https://mt.ptzykjgs.com/xxl-job-admin/auth/login-by-code?code=" + code
|
||||||
+ '&redirectUri=' + redirectUri,
|
+ '&redirectUri=' + redirectUri,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
success: function (result) {
|
success: function (result) {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess;
|
package cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess;
|
||||||
|
|
||||||
import cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo.AreaDataVO;
|
import cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo.AreaDataVO;
|
||||||
|
import cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo.EntryRecordVo;
|
||||||
import cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo.ParkingLotDataVO;
|
import cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo.ParkingLotDataVO;
|
||||||
import cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo.RevenueVO;
|
import cn.iocoder.yudao.module.datacenter.controller.app.vehicleaccess.vo.RevenueVO;
|
||||||
import cn.iocoder.yudao.module.datacenter.dal.dataobject.vehicleaccess.*;
|
import cn.iocoder.yudao.module.datacenter.dal.dataobject.vehicleaccess.*;
|
||||||
@ -93,6 +94,22 @@ public class VehicleAccessApi {
|
|||||||
LocalDateTime endOfDay = LocalDateTime.of(today, LocalTime.MAX);
|
LocalDateTime endOfDay = LocalDateTime.of(today, LocalTime.MAX);
|
||||||
List<EntryRecord> entryRecords = entryRecordRepository.findByCreateTimeBetween(startOfDay, endOfDay);
|
List<EntryRecord> entryRecords = entryRecordRepository.findByCreateTimeBetween(startOfDay, endOfDay);
|
||||||
parkingLotDataVO.setIntoNum(entryRecords.size());//车辆进入数
|
parkingLotDataVO.setIntoNum(entryRecords.size());//车辆进入数
|
||||||
|
//固定车临时车
|
||||||
|
int temporaryCar = 0;
|
||||||
|
int fixationCar = 0;
|
||||||
|
for (int i = 0; i < entryRecords.size(); i++) {
|
||||||
|
for (int j = 0; j < entryRecords.get(i).getDatas().size(); j++) {
|
||||||
|
EntryRecordVo entryRecordVo = entryRecords.get(i).getDatas().get(j);
|
||||||
|
if (entryRecordVo.getCarType().equals("临时车")){
|
||||||
|
temporaryCar ++ ;
|
||||||
|
}
|
||||||
|
if (entryRecordVo.getCarType().equals("固定车")){
|
||||||
|
fixationCar ++ ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
parkingLotDataVO.setTemporaryCar(temporaryCar);
|
||||||
|
parkingLotDataVO.setFixationCar(fixationCar);
|
||||||
List<AppearanceRecord> appearanceRecords = appearanceRecordRepository.findByCreateTimeBetween(startOfDay, endOfDay);
|
List<AppearanceRecord> appearanceRecords = appearanceRecordRepository.findByCreateTimeBetween(startOfDay, endOfDay);
|
||||||
parkingLotDataVO.setOutNum(appearanceRecords.size());//车辆出入数
|
parkingLotDataVO.setOutNum(appearanceRecords.size());//车辆出入数
|
||||||
|
|
||||||
|
@ -32,6 +32,12 @@ public class ParkingLotDataVO {
|
|||||||
//总利用率
|
//总利用率
|
||||||
private Double useRatio;
|
private Double useRatio;
|
||||||
|
|
||||||
|
//临时车数量
|
||||||
|
private int temporaryCar;
|
||||||
|
|
||||||
|
//固定车数量
|
||||||
|
private int fixationCar;
|
||||||
|
|
||||||
//区域停车场数据集合
|
//区域停车场数据集合
|
||||||
private List<AreaDataVO> areaDataVOList = new ArrayList<>();
|
private List<AreaDataVO> areaDataVOList = new ArrayList<>();
|
||||||
|
|
||||||
|
@ -3,6 +3,8 @@ package cn.iocoder.yudao.module.datacenter.controller.app.weather;
|
|||||||
import cn.iocoder.yudao.module.datacenter.controller.app.weather.vo.WeatherInfoVO;
|
import cn.iocoder.yudao.module.datacenter.controller.app.weather.vo.WeatherInfoVO;
|
||||||
import cn.iocoder.yudao.module.datacenter.utlis.GoodWeatherUtil;
|
import cn.iocoder.yudao.module.datacenter.utlis.GoodWeatherUtil;
|
||||||
import cn.iocoder.yudao.module.datacenter.utlis.ResponseVO;
|
import cn.iocoder.yudao.module.datacenter.utlis.ResponseVO;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@ -18,6 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@RequestMapping("/h5/weather")
|
@RequestMapping("/h5/weather")
|
||||||
@Validated
|
@Validated
|
||||||
public class WeatherApi {
|
public class WeatherApi {
|
||||||
|
|
||||||
@GetMapping(value = "/getWeather")
|
@GetMapping(value = "/getWeather")
|
||||||
@Operation(summary = "获得输入城市的天气")
|
@Operation(summary = "获得输入城市的天气")
|
||||||
public ResponseVO getWeather(String cityCode) {
|
public ResponseVO getWeather(String cityCode) {
|
||||||
@ -25,4 +28,18 @@ public class WeatherApi {
|
|||||||
WeatherInfoVO weatherInfo = GoodWeatherUtil.GetWeather(weatherData);
|
WeatherInfoVO weatherInfo = GoodWeatherUtil.GetWeather(weatherData);
|
||||||
return new ResponseVO(200,"",weatherInfo,0);
|
return new ResponseVO(200,"",weatherInfo,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取未来三天天气预报
|
||||||
|
* @param cityCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/getFutureWeather")
|
||||||
|
public ResponseVO getFutureWeather(String cityCode) {
|
||||||
|
String weatherData = GoodWeatherUtil.getFutureWeather(cityCode);
|
||||||
|
JSONObject dataOfJson = JSONObject.parseObject(weatherData);
|
||||||
|
JSONArray forecasts = dataOfJson.getJSONArray("forecasts");
|
||||||
|
return new ResponseVO(200,"",forecasts,0);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -18,15 +18,14 @@ public class GoodWeatherUtil {
|
|||||||
//高德地图
|
//高德地图
|
||||||
private static final String WEATHER_SERVICES_URL = "https://restapi.amap.com/v3/weather/weatherInfo?city=";
|
private static final String WEATHER_SERVICES_URL = "https://restapi.amap.com/v3/weather/weatherInfo?city=";
|
||||||
private static final String WEATHER_KEY = "&key=172993e9541be0a4f824feedeb210b7e";
|
private static final String WEATHER_KEY = "&key=172993e9541be0a4f824feedeb210b7e";
|
||||||
|
private static final String WEATHER_TYPE = "&extensions=all";
|
||||||
//和风天气
|
|
||||||
private static final String WEATHER_SERVICES_URL2 = "https://geoapi.qweather.com/v2/city/lookup?";
|
|
||||||
private static final String LOCATION = "location="; //区县名称
|
|
||||||
private static final String ADM = "&adm="; //城市名称
|
|
||||||
private static final String PRIVATE_KEY = "&key=1c0db79d181441258030a633197fb429";
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 今日实况天气
|
||||||
|
* @param cityCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
public static String getWeatherData(String cityCode){
|
public static String getWeatherData(String cityCode){
|
||||||
int codelength = cityCode.length();
|
int codelength = cityCode.length();
|
||||||
if (6 != codelength){
|
if (6 != codelength){
|
||||||
@ -53,6 +52,39 @@ public class GoodWeatherUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取未来三天天气预报
|
||||||
|
* @param cityCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static String getFutureWeather(String cityCode){
|
||||||
|
int codelength = cityCode.length();
|
||||||
|
if (6 != codelength){
|
||||||
|
return "500";
|
||||||
|
}
|
||||||
|
StringBuffer sb = new StringBuffer();
|
||||||
|
try {
|
||||||
|
String weather_url = WEATHER_SERVICES_URL + cityCode + WEATHER_KEY + WEATHER_TYPE;
|
||||||
|
URL url = new URL(weather_url);
|
||||||
|
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||||
|
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
|
||||||
|
connection.setRequestProperty("Charset", "utf-8");
|
||||||
|
connection.connect();
|
||||||
|
//读取URL的响应
|
||||||
|
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), "utf-8"));
|
||||||
|
String line = null;
|
||||||
|
while ((line = reader.readLine()) != null)
|
||||||
|
sb.append(line + " ");
|
||||||
|
reader.close();
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 将JSON格式数据进行解析 ,返回一个weather对象
|
* 将JSON格式数据进行解析 ,返回一个weather对象
|
||||||
*/
|
*/
|
||||||
@ -60,7 +92,6 @@ public class GoodWeatherUtil {
|
|||||||
if ("500".equals(weatherInfobyJson)){
|
if ("500".equals(weatherInfobyJson)){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject dataOfJson = JSONObject.parseObject(weatherInfobyJson);
|
JSONObject dataOfJson = JSONObject.parseObject(weatherInfobyJson);
|
||||||
System.out.println(dataOfJson);
|
System.out.println(dataOfJson);
|
||||||
//创建WeatherInfo对象,提取所需的天气信息
|
//创建WeatherInfo对象,提取所需的天气信息
|
||||||
@ -88,76 +119,4 @@ public class GoodWeatherUtil {
|
|||||||
return weatherInfoVO;
|
return weatherInfoVO;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// public static String getWeatherDataHF(String areaName,String cityName){
|
|
||||||
// if (areaName == null && cityName == null){
|
|
||||||
// return "500";
|
|
||||||
// }
|
|
||||||
// StringBuffer sb = new StringBuffer();
|
|
||||||
// try {
|
|
||||||
// String weather_url = WEATHER_SERVICES_URL2+LOCATION+areaName+ADM+cityName+PRIVATE_KEY;
|
|
||||||
// URL url = new URL(weather_url);
|
|
||||||
// HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
|
||||||
// connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
|
|
||||||
// connection.setRequestProperty("Charset", "utf-8");
|
|
||||||
// connection.connect();
|
|
||||||
// //读取URL的响应
|
|
||||||
// BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), "utf-8"));
|
|
||||||
// String line = null;
|
|
||||||
// while ((line = reader.readLine()) != null)
|
|
||||||
// sb.append(line + " ");
|
|
||||||
// reader.close();
|
|
||||||
// }catch (Exception e){
|
|
||||||
// e.printStackTrace();
|
|
||||||
// }
|
|
||||||
// return sb.toString();
|
|
||||||
// }
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 将JSON格式数据进行解析 ,返回一个weather对象
|
|
||||||
*/
|
|
||||||
// public static String GetWeatherHF(String weatherInfobyJson) {
|
|
||||||
// if ("500".equals(weatherInfobyJson)){
|
|
||||||
// return null;
|
|
||||||
// }
|
|
||||||
// JSONObject dataOfJson = JSONObject.parseObject(weatherInfobyJson);
|
|
||||||
// System.out.println(dataOfJson);
|
|
||||||
// //创建WeatherInfo对象,提取所需的天气信息
|
|
||||||
// WeatherInfoVO weatherInfoVO = new WeatherInfoVO();
|
|
||||||
//
|
|
||||||
// //从json数据中提取数据
|
|
||||||
// JSONArray location = dataOfJson.getJSONArray("location");
|
|
||||||
// JSONObject weather = location.getJSONObject(0);
|
|
||||||
//
|
|
||||||
// // 取得当天的天气信息
|
|
||||||
// weatherInfoVO.setWeatherInfo(weather.getString("weather"));
|
|
||||||
//
|
|
||||||
// // 设置气温
|
|
||||||
// String temperature = weather.getString("temperature");
|
|
||||||
// weatherInfoVO.setTemperature(Integer.parseInt(temperature));
|
|
||||||
//
|
|
||||||
// //设置风力信息
|
|
||||||
// String windPower = weather.getString("windpower");
|
|
||||||
// weatherInfoVO.setWindPower(windPower);
|
|
||||||
//
|
|
||||||
// //设置风向信息
|
|
||||||
// String windDirection = weather.getString("winddirection");
|
|
||||||
// weatherInfoVO.setWindDirection(windDirection);
|
|
||||||
//
|
|
||||||
// return weatherInfoVO;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void main(String [] args) {
|
|
||||||
String weatherData = GoodWeatherUtil.getWeatherData("360730");
|
|
||||||
|
|
||||||
|
|
||||||
WeatherInfoVO weatherInfoVO = GoodWeatherUtil.GetWeather(weatherData);
|
|
||||||
|
|
||||||
System.out.println(weatherInfoVO);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性
|
## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性
|
||||||
## 感谢复旦核博士的建议!灰子哥,牛皮!
|
## 感谢复旦核博士的建议!灰子哥,牛皮!
|
||||||
FROM eclipse-temurin:8-jre
|
FROM openjdk:8-jre
|
||||||
|
|
||||||
## 创建目录,并使用它作为工作目录
|
## 创建目录,并使用它作为工作目录
|
||||||
RUN mkdir -p /ludu-module-parking-biz
|
RUN mkdir -p /ludu-module-parking-biz
|
||||||
@ -11,7 +11,7 @@ COPY ./target/ludu-module-parking-biz.jar app.jar
|
|||||||
## 设置 TZ 时区
|
## 设置 TZ 时区
|
||||||
ENV TZ=Asia/Shanghai
|
ENV TZ=Asia/Shanghai
|
||||||
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
|
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
|
||||||
ENV JAVA_OPTS="-Xms512m -Xmx512m -Djava.security.egd=file:/dev/./urandom"
|
ENV JAVA_OPTS="-Xms256m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||||
|
|
||||||
## 暴露后端项目的 48090 端口
|
## 暴露后端项目的 48090 端口
|
||||||
EXPOSE 48090
|
EXPOSE 48090
|
||||||
|
@ -10,6 +10,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
//@MapperScan("cn.iocoder.yudao.module.parking.dal.mysql.channelinformation.ChannelInformationMapper")
|
//@MapperScan("cn.iocoder.yudao.module.parking.dal.mysql.channelinformation.ChannelInformationMapper")
|
||||||
public class ParkingServerApplication {
|
public class ParkingServerApplication {
|
||||||
|
//测试
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(ParkingServerApplication.class, args);
|
SpringApplication.run(ParkingServerApplication.class, args);
|
||||||
|
@ -0,0 +1,100 @@
|
|||||||
|
package cn.iocoder.yudao.module.parking.controller.admin.chargeinfo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import io.swagger.v3.oas.annotations.Parameter;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
|
||||||
|
import javax.validation.*;
|
||||||
|
import javax.servlet.http.*;
|
||||||
|
import java.util.*;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||||
|
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.parking.controller.admin.chargeinfo.vo.*;
|
||||||
|
import cn.iocoder.yudao.module.parking.dal.dataobject.chargeinfo.ChargeInfoDO;
|
||||||
|
import cn.iocoder.yudao.module.parking.service.chargeinfo.ChargeInfoService;
|
||||||
|
|
||||||
|
@Tag(name = "管理后台 - 收费信息")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/parking/charge-info")
|
||||||
|
@Validated
|
||||||
|
public class ChargeInfoController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ChargeInfoService chargeInfoService;
|
||||||
|
|
||||||
|
@PostMapping("/insertChargeInformation")
|
||||||
|
public BlueCardResult insertChargeInformation(@RequestBody ChargeInfoReqDataVO chargeInformation){
|
||||||
|
return chargeInfoService.uploadChargeInformation(chargeInformation);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/create")
|
||||||
|
@Operation(summary = "创建收费信息")
|
||||||
|
@PreAuthorize("@ss.hasPermission('parking:charge-info:create')")
|
||||||
|
public CommonResult<Long> createchargeInfo(@Valid @RequestBody ChargeInfoSaveReqVO createReqVO) {
|
||||||
|
return success(chargeInfoService.createchargeInfo(createReqVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping("/update")
|
||||||
|
@Operation(summary = "更新收费信息")
|
||||||
|
@PreAuthorize("@ss.hasPermission('parking:charge-info:update')")
|
||||||
|
public CommonResult<Boolean> updatechargeInfo(@Valid @RequestBody ChargeInfoSaveReqVO updateReqVO) {
|
||||||
|
chargeInfoService.updatechargeInfo(updateReqVO);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@DeleteMapping("/delete")
|
||||||
|
@Operation(summary = "删除收费信息")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true)
|
||||||
|
@PreAuthorize("@ss.hasPermission('parking:charge-info:delete')")
|
||||||
|
public CommonResult<Boolean> deletechargeInfo(@RequestParam("id") Long id) {
|
||||||
|
chargeInfoService.deletechargeInfo(id);
|
||||||
|
return success(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/get")
|
||||||
|
@Operation(summary = "获得收费信息")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('parking:charge-info:query')")
|
||||||
|
public CommonResult<ChargeInfoRespVO> getchargeInfo(@RequestParam("id") Long id) {
|
||||||
|
ChargeInfoDO chargeInfo = chargeInfoService.getchargeInfo(id);
|
||||||
|
return success(BeanUtils.toBean(chargeInfo, ChargeInfoRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/page")
|
||||||
|
@Operation(summary = "获得收费信息分页")
|
||||||
|
@PreAuthorize("@ss.hasPermission('parking:charge-info:query')")
|
||||||
|
public CommonResult<PageResult<ChargeInfoRespVO>> getchargeInfoPage(@Valid ChargeInfoPageReqVO pageReqVO) {
|
||||||
|
PageResult<ChargeInfoDO> pageResult = chargeInfoService.getchargeInfoPage(pageReqVO);
|
||||||
|
return success(BeanUtils.toBean(pageResult, ChargeInfoRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/export-excel")
|
||||||
|
@Operation(summary = "导出收费信息 Excel")
|
||||||
|
@PreAuthorize("@ss.hasPermission('parking:charge-info:export')")
|
||||||
|
@ApiAccessLog(operateType = EXPORT)
|
||||||
|
public void exportchargeInfoExcel(@Valid ChargeInfoPageReqVO pageReqVO,
|
||||||
|
HttpServletResponse response) throws IOException {
|
||||||
|
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
|
List<ChargeInfoDO> list = chargeInfoService.getchargeInfoPage(pageReqVO).getList();
|
||||||
|
// 导出 Excel
|
||||||
|
ExcelUtils.write(response, "收费信息.xls", "数据", ChargeInfoRespVO.class,
|
||||||
|
BeanUtils.toBean(list, ChargeInfoRespVO.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,83 @@
|
|||||||
|
package cn.iocoder.yudao.module.parking.controller.admin.chargeinfo.vo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 收费信息分页 Request VO")
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
public class ChargeInfoPageReqVO extends PageParam {
|
||||||
|
|
||||||
|
@Schema(description = "场库编号")
|
||||||
|
private String parkNumber;
|
||||||
|
|
||||||
|
@Schema(description = "车牌号")
|
||||||
|
private String plate;
|
||||||
|
|
||||||
|
@Schema(description = "入场时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private String[] inTime;
|
||||||
|
|
||||||
|
@Schema(description = "结算时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private String[] outTime;
|
||||||
|
|
||||||
|
@Schema(description = "入场通道")
|
||||||
|
private String inChannel;
|
||||||
|
|
||||||
|
@Schema(description = "出场通道")
|
||||||
|
private String outChannel;
|
||||||
|
|
||||||
|
@Schema(description = "支付类型")
|
||||||
|
private String payKind;
|
||||||
|
|
||||||
|
@Schema(description = "支付渠道")
|
||||||
|
private String payChannel;
|
||||||
|
|
||||||
|
@Schema(description = "入场订单号", example = "16414")
|
||||||
|
private String orderId;
|
||||||
|
|
||||||
|
@Schema(description = "车辆类型", example = "1")
|
||||||
|
private String carType;
|
||||||
|
|
||||||
|
@Schema(description = "支付订单号")
|
||||||
|
private String payNo;
|
||||||
|
|
||||||
|
@Schema(description = "备注", example = "随便")
|
||||||
|
private String memo;
|
||||||
|
|
||||||
|
@Schema(description = "应缴金额")
|
||||||
|
private String charge;
|
||||||
|
|
||||||
|
@Schema(description = "实收金额")
|
||||||
|
private String realCharge;
|
||||||
|
|
||||||
|
@Schema(description = "优惠金额")
|
||||||
|
private String couponCharge;
|
||||||
|
|
||||||
|
@Schema(description = "区域 ID", example = "19866")
|
||||||
|
private String areaId;
|
||||||
|
|
||||||
|
@Schema(description = "操作员名称", example = "王五")
|
||||||
|
private String operatorName;
|
||||||
|
|
||||||
|
@Schema(description = "操作员联系电话")
|
||||||
|
private String operatorTelphone;
|
||||||
|
|
||||||
|
@Schema(description = "支付订单号")
|
||||||
|
private String outTradeNo;
|
||||||
|
|
||||||
|
@Schema(description = "车牌颜色")
|
||||||
|
private String plateColor;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间")
|
||||||
|
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||||
|
private LocalDateTime[] createTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package cn.iocoder.yudao.module.parking.controller.admin.chargeinfo.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 收费信息接口请求参数")
|
||||||
|
@Data
|
||||||
|
public class ChargeInfoReqDataVO {
|
||||||
|
@Schema(description = "场库编号")
|
||||||
|
private String parkNumber;
|
||||||
|
@Schema(description = "收费信息数量")
|
||||||
|
private String size;
|
||||||
|
@Schema(description = "收费信息列表")
|
||||||
|
private List<ChargeInfoSaveReqVO> datas;
|
||||||
|
}
|
@ -0,0 +1,102 @@
|
|||||||
|
package cn.iocoder.yudao.module.parking.controller.admin.chargeinfo.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import com.alibaba.excel.annotation.*;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 收费信息 Response VO")
|
||||||
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
|
public class ChargeInfoRespVO {
|
||||||
|
|
||||||
|
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28728")
|
||||||
|
@ExcelProperty("id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "场库编号")
|
||||||
|
@ExcelProperty("场库编号")
|
||||||
|
private String parkNumber;
|
||||||
|
|
||||||
|
@Schema(description = "车牌号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("车牌号")
|
||||||
|
private String plate;
|
||||||
|
|
||||||
|
@Schema(description = "入场时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("入场时间")
|
||||||
|
private String inTime;
|
||||||
|
|
||||||
|
@Schema(description = "结算时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("结算时间")
|
||||||
|
private String outTime;
|
||||||
|
|
||||||
|
@Schema(description = "入场通道")
|
||||||
|
@ExcelProperty("入场通道")
|
||||||
|
private String inChannel;
|
||||||
|
|
||||||
|
@Schema(description = "出场通道")
|
||||||
|
@ExcelProperty("出场通道")
|
||||||
|
private String outChannel;
|
||||||
|
|
||||||
|
@Schema(description = "支付类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("支付类型")
|
||||||
|
private String payKind;
|
||||||
|
|
||||||
|
@Schema(description = "支付渠道", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("支付渠道")
|
||||||
|
private String payChannel;
|
||||||
|
|
||||||
|
@Schema(description = "入场订单号", example = "16414")
|
||||||
|
@ExcelProperty("入场订单号")
|
||||||
|
private String orderId;
|
||||||
|
|
||||||
|
@Schema(description = "车辆类型", example = "1")
|
||||||
|
@ExcelProperty("车辆类型")
|
||||||
|
private String carType;
|
||||||
|
|
||||||
|
@Schema(description = "支付订单号")
|
||||||
|
@ExcelProperty("支付订单号")
|
||||||
|
private String payNo;
|
||||||
|
|
||||||
|
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "随便")
|
||||||
|
@ExcelProperty("备注")
|
||||||
|
private String memo;
|
||||||
|
|
||||||
|
@Schema(description = "应缴金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("应缴金额")
|
||||||
|
private String charge;
|
||||||
|
|
||||||
|
@Schema(description = "实收金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("实收金额")
|
||||||
|
private String realCharge;
|
||||||
|
|
||||||
|
@Schema(description = "优惠金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("优惠金额")
|
||||||
|
private String couponCharge;
|
||||||
|
|
||||||
|
@Schema(description = "区域 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19866")
|
||||||
|
@ExcelProperty("区域 ID")
|
||||||
|
private String areaId;
|
||||||
|
|
||||||
|
@Schema(description = "操作员名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||||
|
@ExcelProperty("操作员名称")
|
||||||
|
private String operatorName;
|
||||||
|
|
||||||
|
@Schema(description = "操作员联系电话", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("操作员联系电话")
|
||||||
|
private String operatorTelphone;
|
||||||
|
|
||||||
|
@Schema(description = "支付订单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("支付订单号")
|
||||||
|
private String outTradeNo;
|
||||||
|
|
||||||
|
@Schema(description = "车牌颜色", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("车牌颜色")
|
||||||
|
private String plateColor;
|
||||||
|
|
||||||
|
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@ExcelProperty("创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,89 @@
|
|||||||
|
package cn.iocoder.yudao.module.parking.controller.admin.chargeinfo.vo;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
@Schema(description = "管理后台 - 收费信息新增/修改 Request VO")
|
||||||
|
@Data
|
||||||
|
public class ChargeInfoSaveReqVO {
|
||||||
|
|
||||||
|
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28728")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(description = "场库编号")
|
||||||
|
private String parkNumber;
|
||||||
|
|
||||||
|
@Schema(description = "车牌号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "车牌号不能为空")
|
||||||
|
private String plate;
|
||||||
|
|
||||||
|
@Schema(description = "入场时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "入场时间不能为空")
|
||||||
|
private String inTime;
|
||||||
|
|
||||||
|
@Schema(description = "结算时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "结算时间不能为空")
|
||||||
|
private String outTime;
|
||||||
|
|
||||||
|
@Schema(description = "入场通道")
|
||||||
|
private String inChannel;
|
||||||
|
|
||||||
|
@Schema(description = "出场通道")
|
||||||
|
private String outChannel;
|
||||||
|
|
||||||
|
@Schema(description = "支付类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "支付类型不能为空")
|
||||||
|
private String payKind;
|
||||||
|
|
||||||
|
@Schema(description = "支付渠道", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "支付渠道不能为空")
|
||||||
|
private String payChannel;
|
||||||
|
|
||||||
|
@Schema(description = "入场订单号", example = "16414")
|
||||||
|
private String orderId;
|
||||||
|
|
||||||
|
@Schema(description = "车辆类型", example = "1")
|
||||||
|
private String carType;
|
||||||
|
|
||||||
|
@Schema(description = "支付订单号")
|
||||||
|
private String payNo;
|
||||||
|
|
||||||
|
@Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "随便")
|
||||||
|
@NotEmpty(message = "备注不能为空")
|
||||||
|
private String memo;
|
||||||
|
|
||||||
|
@Schema(description = "应缴金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "应缴金额不能为空")
|
||||||
|
private String charge;
|
||||||
|
|
||||||
|
@Schema(description = "实收金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "实收金额不能为空")
|
||||||
|
private String realCharge;
|
||||||
|
|
||||||
|
@Schema(description = "优惠金额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "优惠金额不能为空")
|
||||||
|
private String couponCharge;
|
||||||
|
|
||||||
|
@Schema(description = "区域 ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19866")
|
||||||
|
@NotEmpty(message = "区域 ID不能为空")
|
||||||
|
private String areaId;
|
||||||
|
|
||||||
|
@Schema(description = "操作员名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
|
||||||
|
@NotEmpty(message = "操作员名称不能为空")
|
||||||
|
private String operatorName;
|
||||||
|
|
||||||
|
@Schema(description = "操作员联系电话", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "操作员联系电话不能为空")
|
||||||
|
private String operatorTelphone;
|
||||||
|
|
||||||
|
@Schema(description = "支付订单号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "支付订单号不能为空")
|
||||||
|
private String outTradeNo;
|
||||||
|
|
||||||
|
@Schema(description = "车牌颜色", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
@NotEmpty(message = "车牌颜色不能为空")
|
||||||
|
private String plateColor;
|
||||||
|
|
||||||
|
}
|
@ -48,4 +48,9 @@ public class CarInfoDO extends BaseDO {
|
|||||||
*/
|
*/
|
||||||
private Integer confidence;
|
private Integer confidence;
|
||||||
|
|
||||||
|
public CarInfoDO(String plate, String plateColor, String carType) {
|
||||||
|
this.plate = plate;
|
||||||
|
this.plateColor = plateColor;
|
||||||
|
this.carType = carType;
|
||||||
|
}
|
||||||
}
|
}
|
@ -0,0 +1,108 @@
|
|||||||
|
package cn.iocoder.yudao.module.parking.dal.dataobject.chargeinfo;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收费信息 DO
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@TableName("charge_info")
|
||||||
|
@KeySequence("charge_info_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ToString(callSuper = true)
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class ChargeInfoDO extends BaseDO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 场库编号
|
||||||
|
*/
|
||||||
|
private String parkNumber;
|
||||||
|
/**
|
||||||
|
* 车牌号
|
||||||
|
*/
|
||||||
|
private String plate;
|
||||||
|
/**
|
||||||
|
* 入场时间
|
||||||
|
*/
|
||||||
|
private String inTime;
|
||||||
|
/**
|
||||||
|
* 结算时间
|
||||||
|
*/
|
||||||
|
private String outTime;
|
||||||
|
/**
|
||||||
|
* 入场通道
|
||||||
|
*/
|
||||||
|
private String inChannel;
|
||||||
|
/**
|
||||||
|
* 出场通道
|
||||||
|
*/
|
||||||
|
private String outChannel;
|
||||||
|
/**
|
||||||
|
* 支付类型
|
||||||
|
*/
|
||||||
|
private String payKind;
|
||||||
|
/**
|
||||||
|
* 支付渠道
|
||||||
|
*/
|
||||||
|
private String payChannel;
|
||||||
|
/**
|
||||||
|
* 入场订单号
|
||||||
|
*/
|
||||||
|
private String orderId;
|
||||||
|
/**
|
||||||
|
* 车辆类型
|
||||||
|
*/
|
||||||
|
private String carType;
|
||||||
|
/**
|
||||||
|
* 支付订单号
|
||||||
|
*/
|
||||||
|
private String payNo;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String memo;
|
||||||
|
/**
|
||||||
|
* 应缴金额
|
||||||
|
*/
|
||||||
|
private String charge;
|
||||||
|
/**
|
||||||
|
* 实收金额
|
||||||
|
*/
|
||||||
|
private String realCharge;
|
||||||
|
/**
|
||||||
|
* 优惠金额
|
||||||
|
*/
|
||||||
|
private String couponCharge;
|
||||||
|
/**
|
||||||
|
* 区域 ID
|
||||||
|
*/
|
||||||
|
private String areaId;
|
||||||
|
/**
|
||||||
|
* 操作员名称
|
||||||
|
*/
|
||||||
|
private String operatorName;
|
||||||
|
/**
|
||||||
|
* 操作员联系电话
|
||||||
|
*/
|
||||||
|
private String operatorTelphone;
|
||||||
|
/**
|
||||||
|
* 支付订单号
|
||||||
|
*/
|
||||||
|
private String outTradeNo;
|
||||||
|
/**
|
||||||
|
* 车牌颜色
|
||||||
|
*/
|
||||||
|
private String plateColor;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package cn.iocoder.yudao.module.parking.dal.mysql.chargeinfo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
|
import cn.iocoder.yudao.module.parking.dal.dataobject.chargeinfo.ChargeInfoDO;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import cn.iocoder.yudao.module.parking.controller.admin.chargeinfo.vo.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收费信息 Mapper
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface ChargeInfoMapper extends BaseMapperX<ChargeInfoDO> {
|
||||||
|
|
||||||
|
default PageResult<ChargeInfoDO> selectPage(ChargeInfoPageReqVO reqVO) {
|
||||||
|
return selectPage(reqVO, new LambdaQueryWrapperX<ChargeInfoDO>()
|
||||||
|
.eqIfPresent(ChargeInfoDO::getParkNumber, reqVO.getParkNumber())
|
||||||
|
.eqIfPresent(ChargeInfoDO::getPlate, reqVO.getPlate())
|
||||||
|
.betweenIfPresent(ChargeInfoDO::getInTime, reqVO.getInTime())
|
||||||
|
.betweenIfPresent(ChargeInfoDO::getOutTime, reqVO.getOutTime())
|
||||||
|
.eqIfPresent(ChargeInfoDO::getInChannel, reqVO.getInChannel())
|
||||||
|
.eqIfPresent(ChargeInfoDO::getOutChannel, reqVO.getOutChannel())
|
||||||
|
.eqIfPresent(ChargeInfoDO::getPayKind, reqVO.getPayKind())
|
||||||
|
.eqIfPresent(ChargeInfoDO::getPayChannel, reqVO.getPayChannel())
|
||||||
|
.eqIfPresent(ChargeInfoDO::getOrderId, reqVO.getOrderId())
|
||||||
|
.eqIfPresent(ChargeInfoDO::getCarType, reqVO.getCarType())
|
||||||
|
.eqIfPresent(ChargeInfoDO::getPayNo, reqVO.getPayNo())
|
||||||
|
.eqIfPresent(ChargeInfoDO::getMemo, reqVO.getMemo())
|
||||||
|
.eqIfPresent(ChargeInfoDO::getCharge, reqVO.getCharge())
|
||||||
|
.eqIfPresent(ChargeInfoDO::getRealCharge, reqVO.getRealCharge())
|
||||||
|
.eqIfPresent(ChargeInfoDO::getCouponCharge, reqVO.getCouponCharge())
|
||||||
|
.eqIfPresent(ChargeInfoDO::getAreaId, reqVO.getAreaId())
|
||||||
|
.likeIfPresent(ChargeInfoDO::getOperatorName, reqVO.getOperatorName())
|
||||||
|
.eqIfPresent(ChargeInfoDO::getOperatorTelphone, reqVO.getOperatorTelphone())
|
||||||
|
.eqIfPresent(ChargeInfoDO::getOutTradeNo, reqVO.getOutTradeNo())
|
||||||
|
.eqIfPresent(ChargeInfoDO::getPlateColor, reqVO.getPlateColor())
|
||||||
|
.betweenIfPresent(ChargeInfoDO::getCreateTime, reqVO.getCreateTime())
|
||||||
|
.orderByDesc(ChargeInfoDO::getId));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,6 +1,10 @@
|
|||||||
package cn.iocoder.yudao.module.parking.service.carinfo;
|
package cn.iocoder.yudao.module.parking.service.carinfo;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.parking.dal.dataobject.carinfo.CarInfoDO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 车辆信息 Service 接口
|
* 车辆信息 Service 接口
|
||||||
*
|
*
|
||||||
@ -8,5 +12,10 @@ package cn.iocoder.yudao.module.parking.service.carinfo;
|
|||||||
*/
|
*/
|
||||||
public interface CarInfoService {
|
public interface CarInfoService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量插入或更新车牌信息
|
||||||
|
* @param carInfoDOList
|
||||||
|
* @return java.lang.Boolean
|
||||||
|
*/
|
||||||
|
Boolean insertOrUpdateBatch(List<CarInfoDO> carInfoDOList);
|
||||||
}
|
}
|
@ -1,10 +1,15 @@
|
|||||||
package cn.iocoder.yudao.module.parking.service.carinfo;
|
package cn.iocoder.yudao.module.parking.service.carinfo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.parking.dal.dataobject.carinfo.CarInfoDO;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import cn.iocoder.yudao.module.parking.dal.mysql.carinfo.CarInfoMapper;
|
import cn.iocoder.yudao.module.parking.dal.mysql.carinfo.CarInfoMapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 车辆信息 Service 实现类
|
* 车辆信息 Service 实现类
|
||||||
@ -19,4 +24,8 @@ public class CarInfoServiceImpl implements CarInfoService {
|
|||||||
private CarInfoMapper carInfoMapper;
|
private CarInfoMapper carInfoMapper;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean insertOrUpdateBatch(List<CarInfoDO> carInfoDOList) {
|
||||||
|
return carInfoMapper.insertOrUpdateBatch(carInfoDOList);
|
||||||
|
}
|
||||||
}
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package cn.iocoder.yudao.module.parking.service.chargeinfo;
|
||||||
|
|
||||||
|
import javax.validation.*;
|
||||||
|
import cn.iocoder.yudao.module.parking.controller.admin.chargeinfo.vo.*;
|
||||||
|
import cn.iocoder.yudao.module.parking.dal.dataobject.chargeinfo.ChargeInfoDO;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收费信息 Service 接口
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
public interface ChargeInfoService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建收费信息
|
||||||
|
*
|
||||||
|
* @param createReqVO 创建信息
|
||||||
|
* @return 编号
|
||||||
|
*/
|
||||||
|
Long createchargeInfo(@Valid ChargeInfoSaveReqVO createReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新收费信息
|
||||||
|
*
|
||||||
|
* @param updateReqVO 更新信息
|
||||||
|
*/
|
||||||
|
void updatechargeInfo(@Valid ChargeInfoSaveReqVO updateReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除收费信息
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
*/
|
||||||
|
void deletechargeInfo(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得收费信息
|
||||||
|
*
|
||||||
|
* @param id 编号
|
||||||
|
* @return 收费信息
|
||||||
|
*/
|
||||||
|
ChargeInfoDO getchargeInfo(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获得收费信息分页
|
||||||
|
*
|
||||||
|
* @param pageReqVO 分页查询
|
||||||
|
* @return 收费信息分页
|
||||||
|
*/
|
||||||
|
PageResult<ChargeInfoDO> getchargeInfoPage(ChargeInfoPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收费信息上传
|
||||||
|
* @param chargeInformation
|
||||||
|
* @return cn.iocoder.yudao.module.parking.util.BlueCardResult
|
||||||
|
*/
|
||||||
|
BlueCardResult uploadChargeInformation(ChargeInfoReqDataVO chargeInformation);
|
||||||
|
}
|
@ -0,0 +1,102 @@
|
|||||||
|
package cn.iocoder.yudao.module.parking.service.chargeinfo;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.parking.dal.dataobject.carinfo.CarInfoDO;
|
||||||
|
import cn.iocoder.yudao.module.parking.service.carinfo.CarInfoService;
|
||||||
|
import cn.iocoder.yudao.module.parking.util.BlueCardResult;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.parking.controller.admin.chargeinfo.vo.*;
|
||||||
|
import cn.iocoder.yudao.module.parking.dal.dataobject.chargeinfo.ChargeInfoDO;
|
||||||
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.module.parking.dal.mysql.chargeinfo.ChargeInfoMapper;
|
||||||
|
|
||||||
|
import java.beans.Beans;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
|
import static cn.iocoder.yudao.module.parking.enums.ErrorCodeConstants.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收费信息 Service 实现类
|
||||||
|
*
|
||||||
|
* @author 芋道源码
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Validated
|
||||||
|
public class ChargeInfoServiceImpl implements ChargeInfoService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ChargeInfoMapper chargeInfoMapper;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CarInfoService carInfoService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long createchargeInfo(ChargeInfoSaveReqVO createReqVO) {
|
||||||
|
// 插入
|
||||||
|
ChargeInfoDO chargeInfo = BeanUtils.toBean(createReqVO, ChargeInfoDO.class);
|
||||||
|
chargeInfoMapper.insert(chargeInfo);
|
||||||
|
// 返回
|
||||||
|
return chargeInfo.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updatechargeInfo(ChargeInfoSaveReqVO updateReqVO) {
|
||||||
|
// 校验存在
|
||||||
|
validatechargeInfoExists(updateReqVO.getId());
|
||||||
|
// 更新
|
||||||
|
ChargeInfoDO updateObj = BeanUtils.toBean(updateReqVO, ChargeInfoDO.class);
|
||||||
|
chargeInfoMapper.updateById(updateObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deletechargeInfo(Long id) {
|
||||||
|
// 校验存在
|
||||||
|
validatechargeInfoExists(id);
|
||||||
|
// 删除
|
||||||
|
chargeInfoMapper.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void validatechargeInfoExists(Long id) {
|
||||||
|
if (chargeInfoMapper.selectById(id) == null) {
|
||||||
|
throw exception(CHARGE_INFO_NOT_EXISTS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ChargeInfoDO getchargeInfo(Long id) {
|
||||||
|
return chargeInfoMapper.selectById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageResult<ChargeInfoDO> getchargeInfoPage(ChargeInfoPageReqVO pageReqVO) {
|
||||||
|
return chargeInfoMapper.selectPage(pageReqVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public BlueCardResult uploadChargeInformation(ChargeInfoReqDataVO chargeInformation) {
|
||||||
|
List<ChargeInfoSaveReqVO> chargeInfoSaveReqVOList = chargeInformation.getDatas();
|
||||||
|
List<CarInfoDO> carInfoDOList = new ArrayList<>();
|
||||||
|
for (ChargeInfoSaveReqVO chargeInfoSaveReqVO : chargeInfoSaveReqVOList) {
|
||||||
|
chargeInfoSaveReqVO.setParkNumber(chargeInformation.getParkNumber());
|
||||||
|
// 存入车信息数组
|
||||||
|
carInfoDOList.add(new CarInfoDO(chargeInfoSaveReqVO.getPlate(), chargeInfoSaveReqVO.getPlateColor(), chargeInfoSaveReqVO.getCarType()));
|
||||||
|
}
|
||||||
|
List<ChargeInfoDO> chargeInfoDOList = BeanUtils.toBean(chargeInfoSaveReqVOList, ChargeInfoDO.class);
|
||||||
|
// 插入收费信息
|
||||||
|
chargeInfoMapper.insertBatch(chargeInfoDOList);
|
||||||
|
// 插入对应车牌信息
|
||||||
|
carInfoService.insertOrUpdateBatch(carInfoDOList);
|
||||||
|
return BlueCardResult.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -48,6 +48,14 @@ public class WarningServiceImpl implements WarningService {
|
|||||||
warningMapper.updateById(updateObj);
|
warningMapper.updateById(updateObj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//public void updateWarning(WarningSaveReqVO updateReqVO) {
|
||||||
|
// // 校验存在
|
||||||
|
// validateWarningExists(updateReqVO.getId());
|
||||||
|
// // 更新
|
||||||
|
// WarningDO updateObj = BeanUtils.toBean(updateReqVO, WarningDO.class);
|
||||||
|
// warningMapper.updateById(updateObj);
|
||||||
|
// }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteWarning(String id) {
|
public void deleteWarning(String id) {
|
||||||
// 校验存在
|
// 校验存在
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="cn.iocoder.yudao.module.parking.dal.mysql.chargeinfo.ChargeInfoMapper">
|
||||||
|
|
||||||
|
<!--
|
||||||
|
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||||
|
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||||
|
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||||
|
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||||
|
-->
|
||||||
|
|
||||||
|
</mapper>
|
@ -1,6 +1,6 @@
|
|||||||
## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性
|
## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性
|
||||||
## 感谢复旦核博士的建议!灰子哥,牛皮!
|
## 感谢复旦核博士的建议!灰子哥,牛皮!
|
||||||
FROM eclipse-temurin:8-jre
|
FROM openjdk:8-jre
|
||||||
|
|
||||||
## 创建目录,并使用它作为工作目录
|
## 创建目录,并使用它作为工作目录
|
||||||
RUN mkdir -p /ludu-module-ticketing-biz
|
RUN mkdir -p /ludu-module-ticketing-biz
|
||||||
@ -11,7 +11,7 @@ COPY ./target/ludu-module-ticketing-biz.jar app.jar
|
|||||||
## 设置 TZ 时区
|
## 设置 TZ 时区
|
||||||
ENV TZ=Asia/Shanghai
|
ENV TZ=Asia/Shanghai
|
||||||
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
|
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
|
||||||
ENV JAVA_OPTS="-Xms512m -Xmx512m -Djava.security.egd=file:/dev/./urandom"
|
ENV JAVA_OPTS="-Xms256m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||||
|
|
||||||
## 暴露后端项目的 48088 端口
|
## 暴露后端项目的 48088 端口
|
||||||
EXPOSE 48088
|
EXPOSE 48088
|
||||||
|
@ -59,7 +59,7 @@ spring:
|
|||||||
# password: SYSDBA # DM 连接的示例
|
# password: SYSDBA # DM 连接的示例
|
||||||
slave: # 模拟从库,可根据自己需要修改
|
slave: # 模拟从库,可根据自己需要修改
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
lazy: true # 开启懒加载,保证启动速度
|
||||||
url: jdbc:mysql://120.46.37.243:3306/ludu_ticketing?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
url: jdbc:mysql://101.43.112.107:3306/ludu_ticketing?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||||
username: root
|
username: root
|
||||||
password: xpower1234
|
password: xpower1234
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ spring:
|
|||||||
# password: SYSDBA # DM 连接的示例
|
# password: SYSDBA # DM 连接的示例
|
||||||
slave: # 模拟从库,可根据自己需要修改
|
slave: # 模拟从库,可根据自己需要修改
|
||||||
lazy: true # 开启懒加载,保证启动速度
|
lazy: true # 开启懒加载,保证启动速度
|
||||||
url: jdbc:mysql://120.46.37.243:3306/ludu_ticketing?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
url: jdbc:mysql://101.43.112.107:3306/ludu_ticketing?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true
|
||||||
username: root
|
username: root
|
||||||
password: xpower1234
|
password: xpower1234
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM eclipse-temurin:8-jre
|
FROM openjdk:8-jre
|
||||||
|
|
||||||
## 创建目录,并使用它作为工作目录
|
## 创建目录,并使用它作为工作目录
|
||||||
RUN mkdir -p /yudao-gateway
|
RUN mkdir -p /yudao-gateway
|
||||||
|
@ -13,4 +13,4 @@ docker rmi ${app_name}:${app_version}
|
|||||||
echo '----build image----'
|
echo '----build image----'
|
||||||
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
|
docker buildx build -f Dockerfile -t ${app_name}:${app_version} .
|
||||||
echo '----start container----'
|
echo '----start container----'
|
||||||
docker run -d -p 48080:48080 --name ${app_name} ${app_name}:${app_version}
|
docker run -d -p 48083:48080 --name ${app_name} ${app_name}:${app_version}
|
@ -1,6 +1,6 @@
|
|||||||
## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性
|
## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性
|
||||||
## 感谢复旦核博士的建议!灰子哥,牛皮!
|
## 感谢复旦核博士的建议!灰子哥,牛皮!
|
||||||
FROM eclipse-temurin:8-jre
|
FROM openjdk:8-jre
|
||||||
|
|
||||||
## 创建目录,并使用它作为工作目录
|
## 创建目录,并使用它作为工作目录
|
||||||
RUN mkdir -p /yudao-module-infra-biz
|
RUN mkdir -p /yudao-module-infra-biz
|
||||||
@ -11,7 +11,7 @@ COPY ./target/yudao-module-infra-biz.jar app.jar
|
|||||||
## 设置 TZ 时区
|
## 设置 TZ 时区
|
||||||
ENV TZ=Asia/Shanghai
|
ENV TZ=Asia/Shanghai
|
||||||
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
|
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
|
||||||
ENV JAVA_OPTS="-Xms512m -Xmx512m -Djava.security.egd=file:/dev/./urandom"
|
ENV JAVA_OPTS="-Xms256m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||||
|
|
||||||
## 暴露后端项目的 48082 端口
|
## 暴露后端项目的 48082 端口
|
||||||
EXPOSE 48082
|
EXPOSE 48082
|
||||||
|
@ -98,7 +98,7 @@ spring:
|
|||||||
xxl:
|
xxl:
|
||||||
job:
|
job:
|
||||||
admin:
|
admin:
|
||||||
addresses: http://crm.fjptzykj.com:9090/xxl-job-admin
|
addresses: https://mt.ptzykjgs.com/xxl-job-admin
|
||||||
executor:
|
executor:
|
||||||
appname: ${spring.application.name} # 执行器 AppName
|
appname: ${spring.application.name} # 执行器 AppName
|
||||||
address:
|
address:
|
||||||
|
@ -66,7 +66,7 @@ spring:
|
|||||||
username: root
|
username: root
|
||||||
password: 123456
|
password: 123456
|
||||||
ticketing:
|
ticketing:
|
||||||
url: jdbc:mysql://101.43.112.107:3306/ludu_ticketing?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
url: jdbc:mysql://120.46.37.243:3306/ludu_ticketing?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
|
||||||
username: root
|
username: root
|
||||||
password: xpower1234
|
password: xpower1234
|
||||||
|
|
||||||
|
@ -103,21 +103,6 @@ spring:
|
|||||||
listener:
|
listener:
|
||||||
missing-topics-fatal: false # 消费监听接口监听的主题不存在时,默认会报错。所以通过设置为 false ,解决报错
|
missing-topics-fatal: false # 消费监听接口监听的主题不存在时,默认会报错。所以通过设置为 false ,解决报错
|
||||||
|
|
||||||
--- #################### 定时任务相关配置 ####################
|
|
||||||
|
|
||||||
xxl:
|
|
||||||
job:
|
|
||||||
admin:
|
|
||||||
addresses: http://127.0.0.1:9090/xxl-job-admin
|
|
||||||
executor:
|
|
||||||
appname: ${spring.application.name} # 执行器 AppName
|
|
||||||
address:
|
|
||||||
ip: # 执行器IP [选填]:默认为空表示自动获取IP,多网卡时可手动设置指定IP,该IP不会绑定Host仅作为通讯实用;地址信息用于 "执行器注册" 和 "调度中心请求并触发任务";
|
|
||||||
port: 0 # ### 执行器端口号 [选填]:小于等于0则自动获取;默认端口为9999,单机部署多个执行器时,注意要配置不同执行器端口;
|
|
||||||
logpath: ${user.home}/logs/xxl-job/${spring.application.name} # 执行器运行日志文件存储磁盘路径
|
|
||||||
logretentiondays: 30 # 执行器日志文件保存天数 [选填] : 过期日志自动清理, 限制值大于等于3时生效; 否则, 如-1, 关闭自动清理功能;
|
|
||||||
accessToken: # 执行器通讯TOKEN
|
|
||||||
|
|
||||||
--- #################### 芋道相关配置 ####################
|
--- #################### 芋道相关配置 ####################
|
||||||
|
|
||||||
yudao:
|
yudao:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性
|
## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性
|
||||||
## 感谢复旦核博士的建议!灰子哥,牛皮!
|
## 感谢复旦核博士的建议!灰子哥,牛皮!
|
||||||
FROM eclipse-temurin:8-jre
|
FROM openjdk:8-jre
|
||||||
|
|
||||||
## 创建目录,并使用它作为工作目录
|
## 创建目录,并使用它作为工作目录
|
||||||
RUN mkdir -p /yudao-module-system-biz
|
RUN mkdir -p /yudao-module-system-biz
|
||||||
@ -11,7 +11,7 @@ COPY ./target/yudao-module-system-biz.jar app.jar
|
|||||||
## 设置 TZ 时区
|
## 设置 TZ 时区
|
||||||
ENV TZ=Asia/Shanghai
|
ENV TZ=Asia/Shanghai
|
||||||
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
|
## 设置 JAVA_OPTS 环境变量,可通过 docker run -e "JAVA_OPTS=" 进行覆盖
|
||||||
ENV JAVA_OPTS="-Xms512m -Xmx512m -Djava.security.egd=file:/dev/./urandom"
|
ENV JAVA_OPTS="-Xms256m -Xmx256m -Djava.security.egd=file:/dev/./urandom"
|
||||||
|
|
||||||
## 暴露后端项目的 48081 端口
|
## 暴露后端项目的 48081 端口
|
||||||
EXPOSE 48081
|
EXPOSE 48081
|
||||||
|
Loading…
Reference in New Issue
Block a user