liuxiaolong
2020-05-27 9ffdb024c5fcc1dd353d3f37fcfdfa21bedba143
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
syntax = "proto3";
 
import "base.proto";
 
package shop;
 
message ProductDetail {
    string id = 1;
    string productBaseId = 2;
    int32 productType = 3;
    string productCode = 4;
    string logoUrl     = 5;
    string productName = 6;
    repeated string productLabelId = 7;
    string productModel = 8;
    string productVersion = 9;
    string summary = 10;
    string description = 11;
    string priceDesc = 12;
    float priceBase = 13;
    float chUnitPrice = 14;
    float authPrice = 15;
 
    string createUserId = 16;
    string createUserName = 17;
    string createTime   = 18;
    string updateUserId = 19;
    string updateUserName = 20;
    string updateTime   = 21;
 
    int32 publishStatus = 22;
    string publishUserId = 23;
    string publishUserName = 24;
    string publishTime = 25;
    repeated Appendix appendix = 26;
 
    repeated ProductFunc funcInfo = 27;
    repeated ModulePrice modulePriceSet = 28; //模块价格设置
    repeated string pics = 29;
}
 
message SaveProductReq {
    string id = 1;
    int32 productType = 2;
    string productBaseId = 3;
    string logoUrl     = 4;
 
    string productName = 5;
    repeated string productLabelId = 6;
    string productModel = 7;
    string productVersion = 8;
    string summary = 9;
    string description = 10;
    string priceDesc = 11;
    float priceBase = 12;
    float chUnitPrice = 13;
    float authPrice = 14;
 
    repeated ProductFunc funcInfo = 15; //功能特点描述
    repeated ModulePrice modulePriceSet = 16; //模块价格设置
 
    repeated Appendix appendix = 17;
    repeated string pics = 18;
    string userId = 19;
    int32 publishStatus = 20;
}
 
message ProductFunc {
    string title = 1;
    string desc = 2;
}
 
message ModulePrice {
    string moduleId = 1;
    string moduleName = 2;
    float modulePrice = 3;
}
 
message SaveProductReply {
 
}
 
message UpdateProductReply {
 
}
 
message GetAllProductReq {
    int32 productType = 1;
    string productId = 2;
    string inputText = 3;
    int32 publishStatus = 4;
    int32 page = 5;
    int32 size = 6;
 
    string orderName = 7;
    string orderType = 8;
    string productLabelId = 9;
}
 
message GetAllProductResp {
    int32 total = 1;
    repeated ProductDetail list = 2;
}
 
message GetProductBaseListReq {
    int32 productType = 1;
}
 
message ProductBaseSdk {
    string id = 1;
    string sdkName = 2;
}
 
message ProductBaseModule {
    string id = 1;
    string moduleName = 2;
}
 
message ProductBase {
    string id = 1;
    int32 productType = 2;
    string name = 3;
    repeated ProductBaseModule modules = 4;
    repeated ProductBaseSdk sdks = 5;
    bool hasPriceBase = 6;
    bool hasChUnitPrice = 7;
    bool hasAuthPrice = 8;
    bool hasModulePrice = 9;
}
 
message GetProductBaseListResp {
    repeated ProductBase list = 1;
}
 
message GetProductTypeReq {
    string scope = 1;
}
 
message UpdateStatusReq {
    repeated string ids = 1;
    int32 status = 2;
}
 
message ProductTypeMenu {
    int32 productType = 1;
    string name = 2;
}
 
message GetProductTypeResp {
    repeated ProductTypeMenu list = 1;
}
 
message GetAllProductMenuReq {
    int32 productType = 1;
}
 
message ProductMenu {
    string id = 1;
    string name = 2;
    repeated ProductBaseModule modules = 3;
    repeated ProductBaseSdk sdks = 4;
    bool hasPriceBase = 5;
    bool hasChUnitPrice = 6;
    bool hasAuthPrice = 7;
    bool hasModulePrice = 8;
}
 
message GetAllProductMenuResp {
    repeated ProductMenu menus = 1;
}
 
service ProductService {
 
    rpc GetProductType(GetProductTypeReq) returns (GetProductTypeResp) {}
 
    rpc GetProductBaseList(GetProductBaseListReq) returns (GetProductBaseListResp) {}
 
    rpc SaveProduct(SaveProductReq) returns (SaveProductReply) {}
 
    rpc UpdateStatus(UpdateStatusReq) returns (CommonBoolReply) {}
 
    rpc Delete(CommonIdsReq) returns (CommonBoolReply) {}
 
    rpc GetAllProduct(GetAllProductReq) returns (GetAllProductResp){}
 
    rpc GetAllProductMenu(GetAllProductMenuReq) returns (GetAllProductMenuResp) {}
}