From c8a3df8ef73d08de60ca49e09a343e87bcc66a91 Mon Sep 17 00:00:00 2001 From: wlzboy <66905212@qq.com> Date: 星期六, 27 九月 2025 22:01:56 +0800 Subject: [PATCH] fix:修改配置 --- ruoyi-system/src/main/java/com/ruoyi/system/config/QRCodeConfig.java | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/config/QRCodeConfig.java b/ruoyi-system/src/main/java/com/ruoyi/system/config/QRCodeConfig.java new file mode 100644 index 0000000..d88fee4 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/config/QRCodeConfig.java @@ -0,0 +1,39 @@ +package com.ruoyi.system.config; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.stereotype.Component; + +/** + * 浜岀淮鐮侀厤缃� + * + * @author ruoyi + */ +@Component +@ConfigurationProperties(prefix = "qrcode") +public class QRCodeConfig { + /** + * 榛樿浜岀淮鐮乁RL妯℃澘 + */ + private String defaultUrl = "http://localhost:8080/evaluation?vehicle={vehicleNo}"; + + public String getDefaultUrl() { + return defaultUrl; + } + + public void setDefaultUrl(String defaultUrl) { + this.defaultUrl = defaultUrl; + } + + /** + * 鏍规嵁杞︾墝鍙风敓鎴愪簩缁寸爜URL + * + * @param vehicleNo 杞︾墝鍙� + * @return 浜岀淮鐮乁RL + */ + public String generateUrl(String vehicleNo) { + if (defaultUrl != null && defaultUrl.contains("{vehicleNo}")) { + return defaultUrl.replace("{vehicleNo}", vehicleNo); + } + return defaultUrl + "?vehicle=" + vehicleNo; + } +} -- Gitblit v1.9.1