From 632bef19cd6229014644e4394d43e95c6707d773 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期一, 22 四月 2024 11:49:36 +0800
Subject: [PATCH] 机台信息增删改查接口

---
 controllers/workshop_manage_controller.go |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/controllers/workshop_manage_controller.go b/controllers/workshop_manage_controller.go
index 434d435..6c34217 100644
--- a/controllers/workshop_manage_controller.go
+++ b/controllers/workshop_manage_controller.go
@@ -2,6 +2,7 @@
 
 import (
 	"github.com/gin-gonic/gin"
+	"gorm.io/gorm"
 	"silkserver/controllers/request"
 	"silkserver/controllers/response"
 	"silkserver/extend/code"
@@ -174,6 +175,10 @@
 	fineness, err := models.NewFinenessRegisterSearch().SetWorkshop(params.WorkshopName).SetWorkshopGroup(params.GroupNumber).
 		SetMarket(params.MarketName).First()
 	if err != nil {
+		if err == gorm.ErrRecordNotFound {
+			util.ResponseFormat(c, code.RequestParamError, "褰撳墠搴勫彛,杞﹂棿,缁勫埆涓�,娌℃湁绾ゅ害鐧昏淇℃伅")
+			return
+		}
 		util.ResponseFormat(c, code.RequestParamError, "鏌ユ壘澶辫触")
 		return
 	}

--
Gitblit v1.8.0