From 029d819f34407022c9cabbd1cc9a7d78b1b428c8 Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期六, 26 八月 2023 15:38:19 +0800
Subject: [PATCH] fix

---
 .gitignore              |    8 +-------
 model/test/product.go   |    1 +
 log/2023-08-26/info.log |   12 ++++++++++++
 router/test/product.go  |    3 +--
 initialize/gorm.go      |    2 +-
 5 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/.gitignore b/.gitignore
index e798a0b..2600d39 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,24 +2,18 @@
 *.o
 *.a
 *.so
-
 # Folders
 _obj
 _test
-
 # Architecture specific extensions/prefixes
 *.[568vq]
 [568vq].out
-
 *.cgo1.go
 *.cgo2.c
 _cgo_defun.c
 _cgo_gotypes.go
 _cgo_export.*
-
 _testmain.go
-
 *.exe
 *.test
-log/*
-
+/log/*
\ No newline at end of file
diff --git a/initialize/gorm.go b/initialize/gorm.go
index e273877..0b0350f 100644
--- a/initialize/gorm.go
+++ b/initialize/gorm.go
@@ -51,7 +51,7 @@
 		example.ExaFile{},
 		example.ExaCustomer{},
 		example.ExaFileChunk{},
-		example.ExaFileUploadAndDownload{}, test.Industry{}, test.SupplierType{}, test.Supplier{}, test.Contract{},
+		example.ExaFileUploadAndDownload{}, test.Industry{}, test.SupplierType{}, test.Supplier{}, test.Contract{}, test.Product{},
 	)
 	if err != nil {
 		global.GVA_LOG.Error("register table failed", zap.Error(err))
diff --git a/log/2023-08-26/info.log b/log/2023-08-26/info.log
index 02e26bd..5245ea2 100644
--- a/log/2023-08-26/info.log
+++ b/log/2023-08-26/info.log
@@ -18,3 +18,15 @@
 [srm]2023/08/26 - 15:23:45.671	info	D:/basic.com/srm/initialize/router.go:37	register swagger handler
 [srm]2023/08/26 - 15:23:45.693	info	D:/basic.com/srm/initialize/router.go:83	router register success
 [srm]2023/08/26 - 15:23:45.704	info	D:/basic.com/srm/core/server.go:36	server run success on 	{"address": ":8889"}
+[srm]2023/08/26 - 15:31:03.961	info	D:/basic.com/srm/initialize/gorm.go:60	register table success
+[srm]2023/08/26 - 15:31:03.967	info	D:/basic.com/srm/initialize/router.go:37	register swagger handler
+[srm]2023/08/26 - 15:31:03.988	info	D:/basic.com/srm/initialize/router.go:83	router register success
+[srm]2023/08/26 - 15:31:03.992	info	D:/basic.com/srm/core/server.go:36	server run success on 	{"address": ":8889"}
+[srm]2023/08/26 - 15:32:51.484	info	D:/basic.com/srm/initialize/gorm.go:60	register table success
+[srm]2023/08/26 - 15:32:51.489	info	D:/basic.com/srm/initialize/router.go:37	register swagger handler
+[srm]2023/08/26 - 15:32:51.506	info	D:/basic.com/srm/initialize/router.go:83	router register success
+[srm]2023/08/26 - 15:32:51.511	info	D:/basic.com/srm/core/server.go:36	server run success on 	{"address": ":8889"}
+[srm]2023/08/26 - 15:33:32.994	info	D:/basic.com/srm/initialize/gorm.go:60	register table success
+[srm]2023/08/26 - 15:33:32.998	info	D:/basic.com/srm/initialize/router.go:37	register swagger handler
+[srm]2023/08/26 - 15:33:33.016	info	D:/basic.com/srm/initialize/router.go:83	router register success
+[srm]2023/08/26 - 15:33:33.030	info	D:/basic.com/srm/core/server.go:36	server run success on 	{"address": ":8889"}
diff --git a/model/test/product.go b/model/test/product.go
index b7ef7d4..a2fe356 100644
--- a/model/test/product.go
+++ b/model/test/product.go
@@ -9,6 +9,7 @@
 	global.GVA_MODEL
 	Name             string   `json:"name" form:"name" gorm:"column:name;comment:鍚嶇О;size:255;"`
 	Number           string   `json:"number" form:"number" gorm:"column:number;comment:缂栫爜;size:255;"`
+	SupplierId       uint     `json:"supplierId" form:"supplierId" gorm:"column:supplier_id;comment:渚涘簲鍟唅d;size:255;"`
 	Unit             string   `json:"unit" form:"unit" gorm:"column:unit;comment:璁¢噺鍗曚綅;size:255;"`
 	PurchasePrice    *float64 `json:"purchasePrice" form:"purchasePrice" gorm:"column:purchase_price;comment:閲囪喘浠锋牸;"`
 	DeliveryTime     *int     `json:"deliveryTime" form:"deliveryTime" gorm:"column:delivery_time;comment:;size:11;"`
diff --git a/router/test/product.go b/router/test/product.go
index d3658b6..5286a84 100644
--- a/router/test/product.go
+++ b/router/test/product.go
@@ -3,7 +3,6 @@
 import (
 	"github.com/gin-gonic/gin"
 	"srm/api/v1"
-	"srm/middleware"
 )
 
 type ProductRouter struct {
@@ -11,7 +10,7 @@
 
 // InitProductRouter 鍒濆鍖� Product 璺敱淇℃伅
 func (s *ProductRouter) InitProductRouter(Router *gin.RouterGroup) {
-	pRouter := Router.Group("p").Use(middleware.OperationRecord())
+	pRouter := Router.Group("p")
 	pRouterWithoutRecord := Router.Group("p")
 	var pApi = v1.ApiGroupApp.TestApiGroup.ProductApi
 	{

--
Gitblit v1.8.0