diff --git a/.drone.yml b/.drone.yml index 413e423f7..821b1cab2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,71 +25,142 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行 - mvn package -Dmaven.test.skip=true # 应用打包命令 - - mkdir -p /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/run.sh /app/build/yudao-gateway - - - 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/Dockerfile /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 - - 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/run.sh /app/build/yudao-module-infra - - - 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/Dockerfile /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 - - 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/run.sh /app/build/ludu-module-ticketing - - - 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/Dockerfile /app/build/ludu-module-parking - - cp ./ludu-module-parking/ludu-module-parking-biz/run.sh /app/build/ludu-module-parking + # - mkdir -p /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/run.sh /app/build/yudao-gateway + # + # - 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/Dockerfile /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 + # - 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/run.sh /app/build/yudao-module-infra + # + # - 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/Dockerfile /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 + # - 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/run.sh /app/build/ludu-module-ticketing + # + # - 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/Dockerfile /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 - 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/run.sh /app/build/ludu-module-datacenter - - name: build-infra-and-copy # 构建基础模块和复制票务停车场到轮渡服务器 - + - name: copy-to-object # 构建基础模块和复制票务停车场到轮渡服务器 + image: appleboy/drone-ssh # SSH工具镜像 - + settings: - + host: 101.43.112.107 # 远程连接地址 - + username: root # 远程连接账号 - - password: - + + password: + from_secret: ssh_password # 从Secret中读取SSH密码 - + port: 22 # 远程连接端口 - - command_timeout: 5m # 远程执行命令超时时间 - + + command_timeout: 15m # 远程执行命令超时时间 + 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/ # - chmod +x ./run.sh # 更改为可执行脚本 -# - ./run.sh || echo "yudao-gateway build failed" # 运行脚本打包应用镜像并运行 - - - cd /ludu/maven/build/yudao-module-system/ - - chmod +x ./run.sh # 更改为可执行脚本 - - ./run.sh || echo "yudao-module-system build failed" # 运行脚本打包应用镜像并运行 - +# - ./run.sh || echo "ludu-module-ticketing build failed" # 运行脚本打包应用镜像并运行 +# +# - cd /ludu/maven/build/yudao-module-system/ +# - 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-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/ # - chmod +x ./run.sh # 更改为可执行脚本 # - ./run.sh || echo "yudao-module-infra build failed" # 运行脚本打包应用镜像并运行 @@ -98,65 +169,6 @@ steps: # 定义流水线执行步骤,这些步骤将顺序执行 # - chmod +x ./run.sh # 更改为可执行脚本 # - ./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: # 定义流水线挂载目录,用于共享数据 - name: maven-build diff --git a/ludu-job-admin/ludu-job-admin-biz/Dockerfile b/ludu-job-admin/ludu-job-admin-biz/Dockerfile index 7a551a98b..ece4a0104 100644 --- a/ludu-job-admin/ludu-job-admin-biz/Dockerfile +++ b/ludu-job-admin/ludu-job-admin-biz/Dockerfile @@ -1,6 +1,4 @@ -## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性 -## 感谢复旦核博士的建议!灰子哥,牛皮! -FROM eclipse-temurin:8-jre +FROM openjdk:8-jre ## 创建目录,并使用它作为工作目录 RUN mkdir -p /ludu-job-admin-biz @@ -11,10 +9,10 @@ COPY ./target/ludu-job-admin-biz.jar app.jar ## 设置 TZ 时区 ENV TZ=Asia/Shanghai ## 设置 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 端口 -EXPOSE 9090 +EXPOSE 48084 ## 启动后端项目 CMD java ${JAVA_OPTS} -jar app.jar diff --git a/ludu-job-admin/ludu-job-admin-biz/run.sh b/ludu-job-admin/ludu-job-admin-biz/run.sh index fa6c9269a..0fb5eef26 100644 --- a/ludu-job-admin/ludu-job-admin-biz/run.sh +++ b/ludu-job-admin/ludu-job-admin-biz/run.sh @@ -13,4 +13,4 @@ docker rmi ${app_name}:${app_version} echo '----build image----' docker buildx build -f Dockerfile -t ${app_name}:${app_version} . echo '----start container----' -docker run -d -p 9090:9090 --name ${app_name} ${app_name}:${app_version} \ No newline at end of file +docker run -d -p 48084:9090 --name ${app_name} ${app_name}:${app_version} \ No newline at end of file diff --git a/ludu-job-admin/ludu-job-admin-biz/src/main/java/com/xxl/job/admin/client/OAuth2Client.java b/ludu-job-admin/ludu-job-admin-biz/src/main/java/com/xxl/job/admin/client/OAuth2Client.java index 80fc9563b..26a081141 100644 --- a/ludu-job-admin/ludu-job-admin-biz/src/main/java/com/xxl/job/admin/client/OAuth2Client.java +++ b/ludu-job-admin/ludu-job-admin-biz/src/main/java/com/xxl/job/admin/client/OAuth2Client.java @@ -22,7 +22,7 @@ import java.nio.charset.StandardCharsets; @Component 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"; /** * 租户编号 diff --git a/ludu-job-admin/ludu-job-admin-biz/src/main/java/com/xxl/job/admin/client/UserClient.java b/ludu-job-admin/ludu-job-admin-biz/src/main/java/com/xxl/job/admin/client/UserClient.java index d794b549d..423a2347b 100644 --- a/ludu-job-admin/ludu-job-admin-biz/src/main/java/com/xxl/job/admin/client/UserClient.java +++ b/ludu-job-admin/ludu-job-admin-biz/src/main/java/com/xxl/job/admin/client/UserClient.java @@ -21,7 +21,7 @@ import org.springframework.web.client.RestTemplate; @Component 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,然后注入 private final RestTemplate restTemplate = new RestTemplate(); diff --git a/ludu-job-admin/ludu-job-admin-biz/src/main/resources/static/js/common.1.js b/ludu-job-admin/ludu-job-admin-biz/src/main/resources/static/js/common.1.js index 372ca0317..85dbf9864 100644 --- a/ludu-job-admin/ludu-job-admin-biz/src/main/resources/static/js/common.1.js +++ b/ludu-job-admin/ludu-job-admin-biz/src/main/resources/static/js/common.1.js @@ -23,7 +23,7 @@ $(function(){ title: I18n.system_tips, 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) { if (data.code == "200") { layer.msg( I18n.logout_success ); diff --git a/ludu-job-admin/ludu-job-admin-biz/src/main/resources/templates/login.ftl b/ludu-job-admin/ludu-job-admin-biz/src/main/resources/templates/login.ftl index 3c01abf72..9bb65511d 100644 --- a/ludu-job-admin/ludu-job-admin-biz/src/main/resources/templates/login.ftl +++ b/ludu-job-admin/ludu-job-admin-biz/src/main/resources/templates/login.ftl @@ -47,9 +47,9 @@ */ function ssoLogin() { 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 - 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 + '&response_type=' + responseType; } @@ -69,9 +69,9 @@ ssoLogin(); } 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({ - 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, method: 'POST', success: function (result) { diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/vehicleaccess/VehicleAccessApi.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/vehicleaccess/VehicleAccessApi.java index 7911dc32b..9f83cf441 100644 --- a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/vehicleaccess/VehicleAccessApi.java +++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/vehicleaccess/VehicleAccessApi.java @@ -1,6 +1,7 @@ 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.EntryRecordVo; 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.dal.dataobject.vehicleaccess.*; @@ -93,6 +94,22 @@ public class VehicleAccessApi { LocalDateTime endOfDay = LocalDateTime.of(today, LocalTime.MAX); List entryRecords = entryRecordRepository.findByCreateTimeBetween(startOfDay, endOfDay); 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 appearanceRecords = appearanceRecordRepository.findByCreateTimeBetween(startOfDay, endOfDay); parkingLotDataVO.setOutNum(appearanceRecords.size());//车辆出入数 diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/vehicleaccess/vo/ParkingLotDataVO.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/vehicleaccess/vo/ParkingLotDataVO.java index ce2b1c605..4057eb158 100644 --- a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/vehicleaccess/vo/ParkingLotDataVO.java +++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/vehicleaccess/vo/ParkingLotDataVO.java @@ -32,6 +32,12 @@ public class ParkingLotDataVO { //总利用率 private Double useRatio; + //临时车数量 + private int temporaryCar; + + //固定车数量 + private int fixationCar; + //区域停车场数据集合 private List areaDataVOList = new ArrayList<>(); diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/weather/WeatherApi.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/weather/WeatherApi.java index 030b508e7..c52002098 100644 --- a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/weather/WeatherApi.java +++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/controller/app/weather/WeatherApi.java @@ -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.utlis.GoodWeatherUtil; 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.tags.Tag; import org.springframework.validation.annotation.Validated; @@ -18,6 +20,7 @@ import org.springframework.web.bind.annotation.RestController; @RequestMapping("/h5/weather") @Validated public class WeatherApi { + @GetMapping(value = "/getWeather") @Operation(summary = "获得输入城市的天气") public ResponseVO getWeather(String cityCode) { @@ -25,4 +28,18 @@ public class WeatherApi { WeatherInfoVO weatherInfo = GoodWeatherUtil.GetWeather(weatherData); 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); + } + } diff --git a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/utlis/GoodWeatherUtil.java b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/utlis/GoodWeatherUtil.java index 1dde195f3..57d1c76f0 100644 --- a/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/utlis/GoodWeatherUtil.java +++ b/ludu-module-datacenter/ludu-module-datacenter-biz/src/main/java/cn/iocoder/yudao/module/datacenter/utlis/GoodWeatherUtil.java @@ -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_KEY = "&key=172993e9541be0a4f824feedeb210b7e"; - - //和风天气 - 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"; - + private static final String WEATHER_TYPE = "&extensions=all"; + /** + * 今日实况天气 + * @param cityCode + * @return + */ public static String getWeatherData(String cityCode){ int codelength = cityCode.length(); 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对象 */ @@ -60,7 +92,6 @@ public class GoodWeatherUtil { if ("500".equals(weatherInfobyJson)){ return null; } - JSONObject dataOfJson = JSONObject.parseObject(weatherInfobyJson); System.out.println(dataOfJson); //创建WeatherInfo对象,提取所需的天气信息 @@ -88,76 +119,4 @@ public class GoodWeatherUtil { 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); - - } - - } \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/Dockerfile b/ludu-module-parking/ludu-module-parking-biz/Dockerfile index de9f365d2..e02d024a9 100644 --- a/ludu-module-parking/ludu-module-parking-biz/Dockerfile +++ b/ludu-module-parking/ludu-module-parking-biz/Dockerfile @@ -1,6 +1,6 @@ ## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性 ## 感谢复旦核博士的建议!灰子哥,牛皮! -FROM eclipse-temurin:8-jre +FROM openjdk:8-jre ## 创建目录,并使用它作为工作目录 RUN mkdir -p /ludu-module-parking-biz @@ -11,7 +11,7 @@ COPY ./target/ludu-module-parking-biz.jar app.jar ## 设置 TZ 时区 ENV TZ=Asia/Shanghai ## 设置 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 端口 EXPOSE 48090 diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/ParkingServerApplication.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/ParkingServerApplication.java index 080d346a7..09b0f5473 100644 --- a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/ParkingServerApplication.java +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/ParkingServerApplication.java @@ -10,6 +10,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication //@MapperScan("cn.iocoder.yudao.module.parking.dal.mysql.channelinformation.ChannelInformationMapper") public class ParkingServerApplication { + //测试 public static void main(String[] args) { SpringApplication.run(ParkingServerApplication.class, args); diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/chargeinfo/ChargeInfoController.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/chargeinfo/ChargeInfoController.java new file mode 100644 index 000000000..8f3d3486c --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/chargeinfo/ChargeInfoController.java @@ -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 createchargeInfo(@Valid @RequestBody ChargeInfoSaveReqVO createReqVO) { + return success(chargeInfoService.createchargeInfo(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新收费信息") + @PreAuthorize("@ss.hasPermission('parking:charge-info:update')") + public CommonResult 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 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 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> getchargeInfoPage(@Valid ChargeInfoPageReqVO pageReqVO) { + PageResult 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 list = chargeInfoService.getchargeInfoPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "收费信息.xls", "数据", ChargeInfoRespVO.class, + BeanUtils.toBean(list, ChargeInfoRespVO.class)); + } + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/chargeinfo/vo/ChargeInfoPageReqVO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/chargeinfo/vo/ChargeInfoPageReqVO.java new file mode 100644 index 000000000..fb632e617 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/chargeinfo/vo/ChargeInfoPageReqVO.java @@ -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; + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/chargeinfo/vo/ChargeInfoReqDataVO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/chargeinfo/vo/ChargeInfoReqDataVO.java new file mode 100644 index 000000000..8ca77751e --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/chargeinfo/vo/ChargeInfoReqDataVO.java @@ -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 datas; +} diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/chargeinfo/vo/ChargeInfoRespVO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/chargeinfo/vo/ChargeInfoRespVO.java new file mode 100644 index 000000000..093d52fd1 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/chargeinfo/vo/ChargeInfoRespVO.java @@ -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; + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/chargeinfo/vo/ChargeInfoSaveReqVO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/chargeinfo/vo/ChargeInfoSaveReqVO.java new file mode 100644 index 000000000..72490582b --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/controller/admin/chargeinfo/vo/ChargeInfoSaveReqVO.java @@ -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; + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/carinfo/CarInfoDO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/carinfo/CarInfoDO.java index 79e1c2fee..5c771dad7 100644 --- a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/carinfo/CarInfoDO.java +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/carinfo/CarInfoDO.java @@ -48,4 +48,9 @@ public class CarInfoDO extends BaseDO { */ private Integer confidence; + public CarInfoDO(String plate, String plateColor, String carType) { + this.plate = plate; + this.plateColor = plateColor; + this.carType = carType; + } } \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/chargeinfo/ChargeInfoDO.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/chargeinfo/ChargeInfoDO.java new file mode 100644 index 000000000..4fd114bc2 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/dataobject/chargeinfo/ChargeInfoDO.java @@ -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; + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/chargeinfo/ChargeInfoMapper.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/chargeinfo/ChargeInfoMapper.java new file mode 100644 index 000000000..b6c74faa8 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/dal/mysql/chargeinfo/ChargeInfoMapper.java @@ -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 { + + default PageResult selectPage(ChargeInfoPageReqVO reqVO) { + return selectPage(reqVO, new LambdaQueryWrapperX() + .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)); + } + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/carinfo/CarInfoService.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/carinfo/CarInfoService.java index afea7cc3d..f0eed97b8 100644 --- a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/carinfo/CarInfoService.java +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/carinfo/CarInfoService.java @@ -1,6 +1,10 @@ package cn.iocoder.yudao.module.parking.service.carinfo; +import cn.iocoder.yudao.module.parking.dal.dataobject.carinfo.CarInfoDO; + +import java.util.List; + /** * 车辆信息 Service 接口 * @@ -8,5 +12,10 @@ package cn.iocoder.yudao.module.parking.service.carinfo; */ public interface CarInfoService { - + /** + * 批量插入或更新车牌信息 + * @param carInfoDOList + * @return java.lang.Boolean + */ + Boolean insertOrUpdateBatch(List carInfoDOList); } \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/carinfo/CarInfoServiceImpl.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/carinfo/CarInfoServiceImpl.java index 002586ab2..fefb64858 100644 --- a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/carinfo/CarInfoServiceImpl.java +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/carinfo/CarInfoServiceImpl.java @@ -1,10 +1,15 @@ package cn.iocoder.yudao.module.parking.service.carinfo; +import cn.iocoder.yudao.module.parking.dal.dataobject.carinfo.CarInfoDO; import org.springframework.stereotype.Service; + import javax.annotation.Resource; + import org.springframework.validation.annotation.Validated; import cn.iocoder.yudao.module.parking.dal.mysql.carinfo.CarInfoMapper; +import java.util.List; + /** * 车辆信息 Service 实现类 @@ -19,4 +24,8 @@ public class CarInfoServiceImpl implements CarInfoService { private CarInfoMapper carInfoMapper; + @Override + public Boolean insertOrUpdateBatch(List carInfoDOList) { + return carInfoMapper.insertOrUpdateBatch(carInfoDOList); + } } \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/chargeinfo/ChargeInfoService.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/chargeinfo/ChargeInfoService.java new file mode 100644 index 000000000..84dfd6ba9 --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/chargeinfo/ChargeInfoService.java @@ -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 getchargeInfoPage(ChargeInfoPageReqVO pageReqVO); + + /** + * 收费信息上传 + * @param chargeInformation + * @return cn.iocoder.yudao.module.parking.util.BlueCardResult + */ + BlueCardResult uploadChargeInformation(ChargeInfoReqDataVO chargeInformation); +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/chargeinfo/ChargeInfoServiceImpl.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/chargeinfo/ChargeInfoServiceImpl.java new file mode 100644 index 000000000..01e1ad25c --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/chargeinfo/ChargeInfoServiceImpl.java @@ -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 getchargeInfoPage(ChargeInfoPageReqVO pageReqVO) { + return chargeInfoMapper.selectPage(pageReqVO); + } + + @Override + @Transactional + public BlueCardResult uploadChargeInformation(ChargeInfoReqDataVO chargeInformation) { + List chargeInfoSaveReqVOList = chargeInformation.getDatas(); + List carInfoDOList = new ArrayList<>(); + for (ChargeInfoSaveReqVO chargeInfoSaveReqVO : chargeInfoSaveReqVOList) { + chargeInfoSaveReqVO.setParkNumber(chargeInformation.getParkNumber()); + // 存入车信息数组 + carInfoDOList.add(new CarInfoDO(chargeInfoSaveReqVO.getPlate(), chargeInfoSaveReqVO.getPlateColor(), chargeInfoSaveReqVO.getCarType())); + } + List chargeInfoDOList = BeanUtils.toBean(chargeInfoSaveReqVOList, ChargeInfoDO.class); + // 插入收费信息 + chargeInfoMapper.insertBatch(chargeInfoDOList); + // 插入对应车牌信息 + carInfoService.insertOrUpdateBatch(carInfoDOList); + return BlueCardResult.success(); + } + +} \ No newline at end of file diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/warning/WarningServiceImpl.java b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/warning/WarningServiceImpl.java index 4e7c198ae..4bb918917 100644 --- a/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/warning/WarningServiceImpl.java +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/java/cn/iocoder/yudao/module/parking/service/warning/WarningServiceImpl.java @@ -48,6 +48,14 @@ public class WarningServiceImpl implements WarningService { warningMapper.updateById(updateObj); } + //public void updateWarning(WarningSaveReqVO updateReqVO) { + // // 校验存在 + // validateWarningExists(updateReqVO.getId()); + // // 更新 + // WarningDO updateObj = BeanUtils.toBean(updateReqVO, WarningDO.class); + // warningMapper.updateById(updateObj); + // } + @Override public void deleteWarning(String id) { // 校验存在 diff --git a/ludu-module-parking/ludu-module-parking-biz/src/main/resources/mapper/chargeinfo/ChargeInfoMapper.xml b/ludu-module-parking/ludu-module-parking-biz/src/main/resources/mapper/chargeinfo/ChargeInfoMapper.xml new file mode 100644 index 000000000..0abe39dbd --- /dev/null +++ b/ludu-module-parking/ludu-module-parking-biz/src/main/resources/mapper/chargeinfo/ChargeInfoMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/ludu-module-ticketing/ludu-module-ticketing-biz/Dockerfile b/ludu-module-ticketing/ludu-module-ticketing-biz/Dockerfile index 633326843..b62dc0fe5 100644 --- a/ludu-module-ticketing/ludu-module-ticketing-biz/Dockerfile +++ b/ludu-module-ticketing/ludu-module-ticketing-biz/Dockerfile @@ -1,6 +1,6 @@ ## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性 ## 感谢复旦核博士的建议!灰子哥,牛皮! -FROM eclipse-temurin:8-jre +FROM openjdk:8-jre ## 创建目录,并使用它作为工作目录 RUN mkdir -p /ludu-module-ticketing-biz @@ -11,7 +11,7 @@ COPY ./target/ludu-module-ticketing-biz.jar app.jar ## 设置 TZ 时区 ENV TZ=Asia/Shanghai ## 设置 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 端口 EXPOSE 48088 diff --git a/ludu-module-ticketing/ludu-module-ticketing-biz/src/main/resources/application-dev.yaml b/ludu-module-ticketing/ludu-module-ticketing-biz/src/main/resources/application-dev.yaml index 55affe246..a57701daf 100644 --- a/ludu-module-ticketing/ludu-module-ticketing-biz/src/main/resources/application-dev.yaml +++ b/ludu-module-ticketing/ludu-module-ticketing-biz/src/main/resources/application-dev.yaml @@ -59,7 +59,7 @@ spring: # password: SYSDBA # DM 连接的示例 slave: # 模拟从库,可根据自己需要修改 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 password: xpower1234 diff --git a/ludu-module-ticketing/ludu-module-ticketing-biz/src/main/resources/application-local.yaml b/ludu-module-ticketing/ludu-module-ticketing-biz/src/main/resources/application-local.yaml index 55affe246..a57701daf 100644 --- a/ludu-module-ticketing/ludu-module-ticketing-biz/src/main/resources/application-local.yaml +++ b/ludu-module-ticketing/ludu-module-ticketing-biz/src/main/resources/application-local.yaml @@ -59,7 +59,7 @@ spring: # password: SYSDBA # DM 连接的示例 slave: # 模拟从库,可根据自己需要修改 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 password: xpower1234 diff --git a/yudao-gateway/Dockerfile b/yudao-gateway/Dockerfile index 64c26a1ea..e1b39c1fa 100644 --- a/yudao-gateway/Dockerfile +++ b/yudao-gateway/Dockerfile @@ -1,4 +1,4 @@ -FROM eclipse-temurin:8-jre +FROM openjdk:8-jre ## 创建目录,并使用它作为工作目录 RUN mkdir -p /yudao-gateway diff --git a/yudao-gateway/run.sh b/yudao-gateway/run.sh index 213c7e0b6..3ba20ba36 100644 --- a/yudao-gateway/run.sh +++ b/yudao-gateway/run.sh @@ -13,4 +13,4 @@ docker rmi ${app_name}:${app_version} echo '----build image----' docker buildx build -f Dockerfile -t ${app_name}:${app_version} . echo '----start container----' -docker run -d -p 48080:48080 --name ${app_name} ${app_name}:${app_version} \ No newline at end of file +docker run -d -p 48083:48080 --name ${app_name} ${app_name}:${app_version} \ No newline at end of file diff --git a/yudao-module-infra/yudao-module-infra-biz/Dockerfile b/yudao-module-infra/yudao-module-infra-biz/Dockerfile index 756ace135..cdeeb575f 100644 --- a/yudao-module-infra/yudao-module-infra-biz/Dockerfile +++ b/yudao-module-infra/yudao-module-infra-biz/Dockerfile @@ -1,6 +1,6 @@ ## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性 ## 感谢复旦核博士的建议!灰子哥,牛皮! -FROM eclipse-temurin:8-jre +FROM openjdk:8-jre ## 创建目录,并使用它作为工作目录 RUN mkdir -p /yudao-module-infra-biz @@ -11,7 +11,7 @@ COPY ./target/yudao-module-infra-biz.jar app.jar ## 设置 TZ 时区 ENV TZ=Asia/Shanghai ## 设置 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 端口 EXPOSE 48082 diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-dev.yaml b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-dev.yaml index 3c4c53c7a..cca440995 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-dev.yaml +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-dev.yaml @@ -98,7 +98,7 @@ spring: xxl: job: admin: - addresses: http://crm.fjptzykj.com:9090/xxl-job-admin + addresses: https://mt.ptzykjgs.com/xxl-job-admin executor: appname: ${spring.application.name} # 执行器 AppName address: diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-local.yaml b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-local.yaml index 158ebba27..166d766fa 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-local.yaml +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application-local.yaml @@ -66,7 +66,7 @@ spring: username: root password: 123456 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 password: xpower1234 diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml index 635d7399c..b29350900 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/resources/application.yaml @@ -103,21 +103,6 @@ spring: listener: 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: diff --git a/yudao-module-system/yudao-module-system-biz/Dockerfile b/yudao-module-system/yudao-module-system-biz/Dockerfile index 64d05042d..bb5164f11 100644 --- a/yudao-module-system/yudao-module-system-biz/Dockerfile +++ b/yudao-module-system/yudao-module-system-biz/Dockerfile @@ -1,6 +1,6 @@ ## AdoptOpenJDK 停止发布 OpenJDK 二进制,而 Eclipse Temurin 是它的延伸,提供更好的稳定性 ## 感谢复旦核博士的建议!灰子哥,牛皮! -FROM eclipse-temurin:8-jre +FROM openjdk:8-jre ## 创建目录,并使用它作为工作目录 RUN mkdir -p /yudao-module-system-biz @@ -11,7 +11,7 @@ COPY ./target/yudao-module-system-biz.jar app.jar ## 设置 TZ 时区 ENV TZ=Asia/Shanghai ## 设置 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 端口 EXPOSE 48081