From e2fd03067d452c9288033f1e17b7cb0085cbbff4 Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期五, 18 九月 2026 09:12:18 +0800
Subject: [PATCH] fix: 优化检查时间渲染格式,确保按yyyy-MM-dd输出

---
 src/main/java/com/ruoyi/basic/controller/ProductController.java |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/ruoyi/basic/controller/ProductController.java b/src/main/java/com/ruoyi/basic/controller/ProductController.java
index 1c5224b..a6d2857 100644
--- a/src/main/java/com/ruoyi/basic/controller/ProductController.java
+++ b/src/main/java/com/ruoyi/basic/controller/ProductController.java
@@ -121,6 +121,22 @@
     }
 
     /**
+     * 鏍规嵁鏉$爜绮剧‘鏌ヨ浜у搧瑙勬牸锛堥噰璐�/閿�鍞�/搴撳瓨鎵爜閫夊晢鍝侊級
+     */
+    @Operation(summary = "鏍规嵁鏉$爜鏌ヨ浜у搧瑙勬牸")
+    @GetMapping("/model/byBarcode")
+    public AjaxResult selectByBarcode(@RequestParam String barcode) {
+        if (barcode == null || barcode.trim().isEmpty()) {
+            return AjaxResult.error("璇蜂紶鍏ユ潯鐮�");
+        }
+        ProductModel productModel = productModelService.selectByBarcode(barcode);
+        if (productModel == null) {
+            return AjaxResult.error("鏉$爜 " + barcode + " 鏈尮閰嶅埌浜у搧瑙勬牸");
+        }
+        return AjaxResult.success(productModel);
+    }
+
+    /**
      * 瀵煎叆浜у搧
      */
     @PostMapping("/import")

--
Gitblit v1.9.3