From 6a2bc7a0f851eafdceabe7ba0a12a3a50dc3363c Mon Sep 17 00:00:00 2001 From: guzeng Date: Mon, 8 Nov 2021 16:51:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=A3=E5=87=8F=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- redis.pb.go | 4 ++++ redis.proto | 1 + 2 files changed, 5 insertions(+) diff --git a/redis.pb.go b/redis.pb.go index f3a5c75..a7dcc9f 100644 --- a/redis.pb.go +++ b/redis.pb.go @@ -495,6 +495,7 @@ type RedisService interface { LRpush(in *LSetRequest, out *LSetResponse) error LRange(in *LRangeRequest, out *HGetListResponse) error LLen(in *LLenRequest, out *LSetResponse) error + ReduceStock(in *SetRequest, out *SetResponse) error } // AcceptRedisServiceClient accepts connections on the listener and serves requests @@ -620,6 +621,9 @@ func (c *RedisServiceClient) LRange(in *LRangeRequest, out *HGetListResponse) er func (c *RedisServiceClient) LLen(in *LLenRequest, out *LSetResponse) error { return c.Call("RedisService.LLen", in, out) } +func (c *RedisServiceClient) ReduceStock(in *SetRequest, out *SetResponse) error { + return c.Call("RedisService.ReduceStock", in, out) +} // DialRedisService connects to an RedisService at the specified network address. func DialRedisService(network, addr string) (*RedisServiceClient, *rpc.Client, error) { diff --git a/redis.proto b/redis.proto index 75ec848..059e871 100644 --- a/redis.proto +++ b/redis.proto @@ -123,4 +123,5 @@ service RedisService { rpc LRpush(LSetRequest) returns (LSetResponse); //列表尾部增加值 rpc LRange(LRangeRequest) returns (HGetListResponse); //列表尾部增加值 rpc LLen(LLenRequest) returns (LSetResponse); //列表长度 + rpc ReduceStock(SetRequest) returns(SetResponse);//扣减库存 } \ No newline at end of file