From 1a84b09fbcd1b1b00bd3590a0764b74f5984f147 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期四, 31 十月 2019 19:04:56 +0800
Subject: [PATCH] update bwType to string

---
 videoperson.proto |    2 +-
 videoperson.pb.go |   47 +++++++++++++++++++++++++++++++----------------
 2 files changed, 32 insertions(+), 17 deletions(-)

diff --git a/videoperson.pb.go b/videoperson.pb.go
index 0c632ee..2e1422c 100644
--- a/videoperson.pb.go
+++ b/videoperson.pb.go
@@ -387,7 +387,7 @@
 	IdCard       string  `protobuf:"bytes,9,opt,name=idCard,proto3" json:"idCard,omitempty"`
 	MonitorLevel string  `protobuf:"bytes,10,opt,name=monitorLevel,proto3" json:"monitorLevel,omitempty"`
 	Content      string  `protobuf:"bytes,11,opt,name=content,proto3" json:"content,omitempty"`
-	BwType       int32   `protobuf:"varint,12,opt,name=bwType,proto3" json:"bwType,omitempty"`
+	BwType       string  `protobuf:"bytes,12,opt,name=bwType,proto3" json:"bwType,omitempty"`
 }
 
 func (m *BaseInfo) Reset()         { *m = BaseInfo{} }
@@ -500,11 +500,11 @@
 	return ""
 }
 
-func (m *BaseInfo) GetBwType() int32 {
+func (m *BaseInfo) GetBwType() string {
 	if m != nil {
 		return m.BwType
 	}
-	return 0
+	return ""
 }
 
 func init() {
@@ -516,7 +516,7 @@
 func init() { proto.RegisterFile("videoperson.proto", fileDescriptor_149f81aa0f752265) }
 
 var fileDescriptor_149f81aa0f752265 = []byte{
-	// 714 bytes of a gzipped FileDescriptorProto
+	// 713 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x54, 0xcf, 0x6e, 0x13, 0x3f,
 	0x10, 0x6e, 0x92, 0x36, 0xdd, 0x3a, 0xfd, 0xeb, 0x5f, 0x7f, 0xc5, 0x94, 0x12, 0x45, 0x11, 0x42,
 	0x39, 0xe5, 0x00, 0xbc, 0x40, 0xda, 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Marshal() (dAtA []byte, err error) {
@@ -945,10 +945,11 @@
 		i = encodeVarintVideoperson(dAtA, i, uint64(len(m.Content)))
 		i += copy(dAtA[i:], m.Content)
 	}
-	if m.BwType != 0 {
-		dAtA[i] = 0x60
+	if len(m.BwType) > 0 {
+		dAtA[i] = 0x62
 		i++
-		i = encodeVarintVideoperson(dAtA, i, uint64(m.BwType))
+		i = encodeVarintVideoperson(dAtA, i, uint64(len(m.BwType)))
+		i += copy(dAtA[i:], m.BwType)
 	}
 	return i, nil
 }
@@ -1170,8 +1171,9 @@
 	if l > 0 {
 		n += 1 + l + sovVideoperson(uint64(l))
 	}
-	if m.BwType != 0 {
-		n += 1 + sovVideoperson(uint64(m.BwType))
+	l = len(m.BwType)
+	if l > 0 {
+		n += 1 + l + sovVideoperson(uint64(l))
 	}
 	return n
 }
@@ -2710,10 +2712,10 @@
 			m.Content = string(dAtA[iNdEx:postIndex])
 			iNdEx = postIndex
 		case 12:
-			if wireType != 0 {
+			if wireType != 2 {
 				return fmt.Errorf("proto: wrong wireType = %d for field BwType", wireType)
 			}
-			m.BwType = 0
+			var stringLen uint64
 			for shift := uint(0); ; shift += 7 {
 				if shift >= 64 {
 					return ErrIntOverflowVideoperson
@@ -2723,11 +2725,24 @@
 				}
 				b := dAtA[iNdEx]
 				iNdEx++
-				m.BwType |= int32(b&0x7F) << shift
+				stringLen |= uint64(b&0x7F) << shift
 				if b < 0x80 {
 					break
 				}
 			}
+			intStringLen := int(stringLen)
+			if intStringLen < 0 {
+				return ErrInvalidLengthVideoperson
+			}
+			postIndex := iNdEx + intStringLen
+			if postIndex < 0 {
+				return ErrInvalidLengthVideoperson
+			}
+			if postIndex > l {
+				return io.ErrUnexpectedEOF
+			}
+			m.BwType = string(dAtA[iNdEx:postIndex])
+			iNdEx = postIndex
 		default:
 			iNdEx = preIndex
 			skippy, err := skipVideoperson(dAtA[iNdEx:])
diff --git a/videoperson.proto b/videoperson.proto
index 63f2ccd..8383313 100644
--- a/videoperson.proto
+++ b/videoperson.proto
@@ -55,6 +55,6 @@
 	string idCard               =9;
 	string monitorLevel         =10;
 	string content              =11;
-    int32 bwType                =12;
+    string bwType               =12;
 }
 

--
Gitblit v1.8.0