From 83df0eea93430543529a9d8b1af30ebb3abdd6fc Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期三, 16 八月 2023 14:19:30 +0800
Subject: [PATCH] Merge branch 'zq'
---
proto/product.proto | 2 +-
api/v1/product.go | 1 -
proto/product/product.pb.go | 6 +++---
conf/config.go | 7 +++++++
4 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/api/v1/product.go b/api/v1/product.go
index f77d0a6..f34eb07 100644
--- a/api/v1/product.go
+++ b/api/v1/product.go
@@ -52,7 +52,6 @@
}
cli := product.NewProductServiceClient(productServiceConn)
-
getProductListResponse, err := cli.GetProductList(ctx.GetCtx(), &product.GetProductListRequest{
Page: cast.ToInt32(params.Page),
PageSize: cast.ToInt32(params.PageSize),
diff --git a/conf/config.go b/conf/config.go
index d6541dd..7626b25 100644
--- a/conf/config.go
+++ b/conf/config.go
@@ -127,6 +127,7 @@
}
ShowConfig()
+ CheckConfig()
}
// WriteConfig 鍥炲啓閰嶇疆
@@ -148,3 +149,9 @@
log.Printf(" GrpcServiceAddr: %+v", Conf.GrpcServiceAddr)
log.Println("......................................................")
}
+
+func CheckConfig() {
+ if Conf.GrpcServiceAddr.Aps == "" {
+ log.Fatalf("%v 灏氭湭閰嶇疆", "GrpcServiceAddr.Aps")
+ }
+}
diff --git a/proto/product.proto b/proto/product.proto
index e2cf073..aec49ae 100644
--- a/proto/product.proto
+++ b/proto/product.proto
@@ -21,7 +21,7 @@
string Name = 2;
string Unit = 3;
bool IsSale = 4; //鏄惁閿�鍞�
- float SalePrice = 5; //閿�鍞环鏍�
+ double SalePrice = 5; //閿�鍞环鏍�
float Amount = 6;//搴撳瓨鍓╀綑閲�
int32 MinInventory = 7;//瀹夊叏搴撳瓨
string MaterialMode = 8; //鐗╂枡绫诲瀷
diff --git a/proto/product/product.pb.go b/proto/product/product.pb.go
index 37f100d..fa286ea 100644
--- a/proto/product/product.pb.go
+++ b/proto/product/product.pb.go
@@ -139,7 +139,7 @@
Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
Unit string `protobuf:"bytes,3,opt,name=Unit,proto3" json:"Unit,omitempty"`
IsSale bool `protobuf:"varint,4,opt,name=IsSale,proto3" json:"IsSale,omitempty"` //鏄惁閿�鍞�
- SalePrice float32 `protobuf:"fixed32,5,opt,name=SalePrice,proto3" json:"SalePrice,omitempty"` //閿�鍞环鏍�
+ SalePrice float64 `protobuf:"fixed64,5,opt,name=SalePrice,proto3" json:"SalePrice,omitempty"` //閿�鍞环鏍�
Amount float32 `protobuf:"fixed32,6,opt,name=Amount,proto3" json:"Amount,omitempty"` //搴撳瓨鍓╀綑閲�
MinInventory int32 `protobuf:"varint,7,opt,name=MinInventory,proto3" json:"MinInventory,omitempty"` //瀹夊叏搴撳瓨
MaterialMode string `protobuf:"bytes,8,opt,name=MaterialMode,proto3" json:"MaterialMode,omitempty"` //鐗╂枡绫诲瀷
@@ -206,7 +206,7 @@
return false
}
-func (x *Product) GetSalePrice() float32 {
+func (x *Product) GetSalePrice() float64 {
if x != nil {
return x.SalePrice
}
@@ -403,7 +403,7 @@
0x55, 0x6e, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x55, 0x6e, 0x69, 0x74,
0x12, 0x16, 0x0a, 0x06, 0x49, 0x73, 0x53, 0x61, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08,
0x52, 0x06, 0x49, 0x73, 0x53, 0x61, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x61, 0x6c, 0x65,
- 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x09, 0x53, 0x61, 0x6c,
+ 0x50, 0x72, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x53, 0x61, 0x6c,
0x65, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74,
0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x22,
0x0a, 0x0c, 0x4d, 0x69, 0x6e, 0x49, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x07,
--
Gitblit v1.8.0