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
syntax = "proto3";
 
import "product.proto";
 
package shop;
 
message ProductRemark {
    repeated string moduleIds = 1;
    int32 chCount = 2;
    int32 authCount = 3;
    int32 devCount = 4;
    repeated string sdkIds = 5;
    int32 serveYear = 6;
}
 
message AddCartReq {
    string productId = 1;
    int32 quantity = 2;
    ProductRemark productRemark = 3;
    string merchantNo = 4;
    bool isSelected = 5;
}
 
message AddCartReply {
 
}
 
message DeleteCartReq {
    repeated string ids = 1;
}
 
message DeleteCartReply {
 
}
 
message FindMyCartReq {
 
}
 
message CartProduct {
    string id = 1;
    string productId = 2;
    ProductDetail productDetail = 3;
    int32 quantity = 4;
    ProductRemark productRemark = 5;
    bool isSelected = 6;
    float price = 7;
}
 
message FindMyCartReply {
    repeated CartProduct list = 1;
}
 
 
service CartService {
 
    rpc FindMyCart(FindMyCartReq) returns (FindMyCartReply) {}
 
    rpc Add(AddCartReq) returns (AddCartReply) {}
 
    rpc Delete(DeleteCartReq) returns (DeleteCartReply) {}
}