From a1c377489c42bb2fc1feb91a6cbddddc44a274d1 Mon Sep 17 00:00:00 2001 From: gjs Date: Fri, 11 Sep 2026 16:26:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E8=AE=A2=E5=8D=95rpc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/utils/status.go | 2 - pkg/validate/defValidator.go | 18 +- rpc/factory/factory.pb | Bin 0 -> 16437 bytes rpc/factory/factory.proto | 217 ++++ rpc/factory/pb/factory.pb.go | 1062 +++++++++++++++++ rpc/factory/pb/factory_grpc.pb.go | 843 +++++++++++++ rpc/order/order.pb | Bin 17889 -> 18523 bytes rpc/order/order.proto | 32 +- rpc/order/pb/order.pb.go | 429 +++++-- rpc/order/pb/order_grpc.pb.go | 76 ++ rpc/store/pb/store.pb.go | 295 +++++ rpc/store/pb/store_grpc.pb.go | 121 ++ rpc/store/store.pb | Bin 0 -> 13649 bytes rpc/store/store.proto | 33 + services/order/internal/dao/cart.go | 4 +- .../order/internal/logic/getOrderInfoLogic.go | 90 +- services/order/internal/logic/itemsLogic.go | 4 +- .../order/internal/logic/orderInfoLogic.go | 70 ++ .../logic/updateOrderDPayStatusLogic.go | 31 + services/order/internal/server/orderServer.go | 10 + services/order/orderClient/order.go | 15 + 21 files changed, 3237 insertions(+), 115 deletions(-) create mode 100644 rpc/factory/factory.pb create mode 100644 rpc/factory/factory.proto create mode 100644 rpc/factory/pb/factory.pb.go create mode 100644 rpc/factory/pb/factory_grpc.pb.go create mode 100644 rpc/store/pb/store.pb.go create mode 100644 rpc/store/pb/store_grpc.pb.go create mode 100644 rpc/store/store.pb create mode 100644 rpc/store/store.proto create mode 100644 services/order/internal/logic/orderInfoLogic.go create mode 100644 services/order/internal/logic/updateOrderDPayStatusLogic.go diff --git a/pkg/utils/status.go b/pkg/utils/status.go index 15808fa..c26594e 100644 --- a/pkg/utils/status.go +++ b/pkg/utils/status.go @@ -37,8 +37,6 @@ const ( MinSort uint8 = 1 //全局基础最小排序 SIZE = 20 //全局基础每页数 - ProjectSaleId = 8 - ProjectPrintId = 9 DecollatorComma = "," //逗号分割符 DecollatorColon = ":" diff --git a/pkg/validate/defValidator.go b/pkg/validate/defValidator.go index 4fec396..c9399c1 100644 --- a/pkg/validate/defValidator.go +++ b/pkg/validate/defValidator.go @@ -1,14 +1,16 @@ package validate const ( - FieldId = "Id.required" - FieldIdValue = "ID不能为空" - FieldStatus = "Status.required" - FieldStatusValue = "状态不能为空" - FieldTypeIn = "Type.oneof" - FieldTypeInValue = "类型传值不对" - FieldType = "Type.required" - FieldTypeValue = "类型不能为空" + FieldId = "Id.required" + FieldIdValue = "ID不能为空" + FieldStatus = "Status.required" + FieldStatusValue = "状态不能为空" + FieldStatusIn = "Status.oneof" + FieldStatusInValue = "状态不能不对" + FieldTypeIn = "Type.oneof" + FieldTypeInValue = "类型传值不对" + FieldType = "Type.required" + FieldTypeValue = "类型不能为空" ) type StatusValidator struct { diff --git a/rpc/factory/factory.pb b/rpc/factory/factory.pb new file mode 100644 index 0000000000000000000000000000000000000000..cccf10074dbb2146f2699e999b997f0aa1a04752 GIT binary patch literal 16437 zcmd5@U2J2=bv7wcB!?1pHPY^Kwd?HqI=0tqn@YHjy7_`9m)u<$MUWew4rzrFEbIP9nUgWj;mnFOZ+ z)(_eIP4w`qEHW5%Y$p}EJa;9LSxfskX+kj3X-X7suuJ=+PUo=Rv>UyqT_4zvJ$Pg{ z>-Lkr)pgpvZYq2^bR}k96li&YWhx}Y#nJyY%wjHUzRqHf-LV_P-T)$muEb5R%{iNE z*+aoIe)AcV8U*W)hN(G1B^Vlfjm`Ia&M-BvfTG1yY@rFxLpv2waMk8#S)^|b8xK+o zszWyUn{1&ma)!NwR16)7%(FpdY>FO|yJ8K8_MnT=6*`2P-|ICGQ&Hk)ir@Tswgmn3 zdtJw_i_S&Sx#$9OAb>_!t!A@5gzBtLeXreZw!1ASl{jWCxKEH%__;WXVnQU8{x(~g zl9c3o2wbIL@ta_vc_6iGir={wOE!83fm!F`V!~uSmC*gHvW-@+V|82U-k`P7vb(~z zHe?qp%Mn&*b-TTxMe}mr4*dQ}cz!!uDeNr>qHFB^Z?emhazjA&M*AC0+i48ieHer? z+hsMZi=ls=t!%YBcHTp*!Z5D0`F#MD9e>`PgiDkjr>M}BOhIvVG4`GR{@E`>+HcTb z{euWwoqRJcHU#v0xhKWJ%jfYmtR%&#c{Bw*o?Y`Y@+TF$>taT1{5rFVl*h+u2 z*J(Gfmpn8Ew1}z6j=TrwFR|svw)HTGN){3^lLQVRZnDJ#+i@UIeR$Znu_0(rU!Ky1 zuQ{oQgrcf}h-X>c?v4&5hlt=XtxW?MlU!m%rdUMDGqf8vwit=<(v%2Q*+0p{rQ@5B z;>pmKUL`7+yfDRNt8I6hlPr8X{sxQo`oaj+j=ng9MaM2n9MeVS1*SQ@(V$`1g`aD8 z_j{?ha0!>D7*qw~Cj4OmXl7Cpx^4KH1?R9kw4S8o{#PxYVNqLd{8SR0lbO^MXG8Xz zE~5Uo3v78}wlmH0Z5G)l&A=#0`6twyq#0MdT)h)A2q-?w5?$LFA~Xm)B>O*!9WqHY zZHCg2PiuyE*|KLt^#NQKg#wafV@lT(YE2ui?U_VoCOtl)&GU@)x^{1$B4G!%HCxSP zLYd%f#swi_V~4-xnu<89u?d`XX#MZ!*_oNV`CYa)>bARxp8Wx`g=Ss4jMPWc>r5NnZV+2a zXs(X2kU)NqCCEOkfe3_ZH)c*Y`9}1g6UPx79`?fV4VPR4kp~?$We77V5 zf}`mn^8>c{$R4!!+YKoctwS<%eTsOduF|&yq*cUs`v%)B-8Rg^R>8Mih0#$Gi9C=1WN_r;lp7JDmwr>;=o+QS?_#FcmVJH9 z-foH%PxQ(5t@+rz7SUg4D^pY9%MjJrEN0DYtxzs$&+sG*%uWkkjmJKYYTv=Xu>R8p zwl*vJ%=E|pq)FTUq_Zs2vG(kaNL-VdSEd$W)(Gh$k(iQ_e?_T=Qru+b>d82ee>H_l zN$;disdteMn=t|iy+g+~`N5{`<~LrO(%YuJZ;d*``Xj3|vQ_T8sDQT##xJpibdyLv z?I$9HMoj5B3k0Fz-*tLjIXsigP5?3do4&W0$j1Xo9m3qClc0P_U|dsM+3KWLz&mCp zC0G(z9sO^@Y@U=sOJBQJG3xp9Zmwu(AzFF?*eaH@H7)G53#Hl{uWNH2!L9_%2NAAi zvtk%pzXKnIwM(~ImlO8MB1{!f;W!YVIdx=7%ih}?J#g&*xA-g>a{V(DyK?iO%IDd{U zzH2?Q>h8%}9=H<(tH{GP23Zp*n4>+YBTsT1kvLG8h?|`H%G9;#_V6#URY7rpfYt7I z>^jv7oD_u|PqG!l*ii^1k%K({SwV&}hm9=GuG`-lVcvDC+pIsZoCm2jVvq}`Lgslw z+*WvoK+ATUH-W@&u(N^-bO;638xQQp!}@5re?4^}IKGe&dI8QRq3i;KSJ`3@$J2xM zdypA5GCGDPGt;gqpuse0k_dKiD7_J>RtzI=CR{FCy#a?owR)a{6JQxP4 zsEawHKtbz;lf0ACg2Jve8e+2ThO%)7`{9hQtRSHXzV7;qSx%B-#Qx#*hR_|qev$maJBMWubvMTz z)*rVAVzVAt@63BjN$|_Voz9%Rcc!a?{fz12B>SI$32eNLBLlOW6wfSxKqQ8CW9lK>U4(lRO z7j-36#k%{bT@I;I?fO66rzi@7TgcggGn?_H$I%c=AJG=@ zcR`EdZ%m8hZ(L*gkC)h@m=0MP%G#)tMjCWf5=D<>=J~0Z8pKX-QY5~yAai?DQqpM{ z4&xzwmsns^wfHt$c-IlUDRd??(=~`O-nXiPdHhzjUMibA*`le)`FS?qvEDlzkJ$nQ zr?@=o%2EJo9s+AQXe>#;w+I#|wJVHBMd|U#DnR@S!|8Bu)WW?{(`pRI;|Z!8=rTnQ ze}~1X6w@U|i=$gI^V;$1m5XA!M5a&AZ?Y(AQ@A^FQme>&lbPun*_bvZtC}Doy_zmL zzr!?Dv&AMAXI}>i0M-6pJzhFh$<0e5b6IgwZD(v>oH@=Hva$YqVU`@97&a1j zR}2-tL9aP#V6#z1dE7WFil*R^1R42$PVCx~Fv|P6$Oc<=8Nj&fkF5c!i7k1bY4SkV z9oYjn>t*Tsf^o2oE$!|)0eS<}W`{9f!2ZZ8QjLmPB%{;;*;-Pd)^-96m zM1<78#1^Daq0s4h6%fg$Do}{PO1--~Il}}QtZ`x=@-uA3G-?I{ZMjt6Exl7J-=WId z7}$-&A*`$BV^_<&rjX{h!c3dol>8i9t!2$^qgEFM4WBi51Ut40qMmb!T?j&ryO60$ zGMU*DDk*!fq3km;x+uFWpdfiR$b+DD=)}B-BGAM{ zs)l*HfN94N9C(mu$Ee*b=e78(h{d&4{m(;4fatsxYD_Q9VxuaI( z|0Czse}9fGjn#f8_SuoreT%KMoAyD!hcpd`gO2?O_ZXyx^TQTV5(Nxj0f$=Q%YpD`ZL`EQAqR1-sbYeV%CQYaN3T|jkK}uB%s2BP5ej5cenM={e zMS;VIiy|w3m2o_-!V{%Ob{#pCLZ*#7kEbfC2bq$G-Nor|0-J89=1k4)@vu>8X!h_7 z##UU(C5Ld)DPWQz6-{K>OiD?_$;2rO4HR8cN9c zgi0WWxB$QBi;<+!d{T_Bx#b~GCGx`dmE%;RicFp|UJNK>jV~9C(su1;yX3s0Rhsx|Ut zWmDQH-ym;7nx`N@R4Y_#*a)L zZd3_i8tN`_PDe0y&6iShkzr393~=Bf+XX)ygQQL4%yOHZnQ3~s;J)PEU)H6Zkg=S{ z&1^tUaFRACrNovL_6fcPmK--Ac${;)wXN&*+u33vFP<2TGm=(>2|`e^E^SVqkA<|5 zUS-P@rob<u7akF7fnG)YpoIT_P||)#|NpS0{it+nA@)&J`#7rq&m7~vWqCD^yDZjp zizxE#@t2R;3@%yP=QLhNFg5zB0Ai<0R>#!Z$t2^?wMlm+LZHjY>VO%>emMc$bKAEc3D>NO$Dacxx<0g?u_A5 z$cUSo+ubU$TmuQgI%~rLqLkT_e@t_Uu->D|CoA zf1-g}l6dn+x>9fcOnTsdU?JCRh%$6CGySUJIN{S(MNJg7`L9wdd|bvrVFjxcU$&$%6M;oqBq&L98w z!esaLK=&U_cfS?r{$q5nqV%HXypz4F{SyD8xo_jr*MIx(zN*P-{uNV&-po5UL-${s z{tm#!-=JFyC-8>9zxNB|v*EezO773X>)YbHl(gW4xBh9<-luOrkdd)J3A2mpQvmvG z#W#6JeFhNtdS!j~2QKSR{g&XyJ8b>|efIK{7Z9nx{Mp~hGyUujVg!?1cj|Kq&EHv$ znB=GO)x^(J?94uHP1iBaddvz-i{x7^jcVx#!+0qsK1!k);&|q1h<=m%K5$yf+tW|NqNf9j zkNB;>#8xW!-s-8=gL{N!LOi7z=)aB(zt{Ri%L#GG1F4`S-?*M4W#nf8FhcsRkJ##+-ryl#4?T5vK+OleJw!vLG1bDgYpg{US%<|dLl*5q6COW` zqREhYq-iZsv(VJ>gl_#CdUr)Q9&xyG+w{_a2h z`|pI;`I!x?iQIqV(X|bsn~gR(ksG0_cz6|;obXi-=N<=dv(DmrNpL;S*QU6F2{HX9 zO9-aYwD<*&Z2)?V)Xxe27xc4}{2RhlX@vVqY%(H#ew=^6u#S;lpOW4NFXH`mCB5`X z{H(`)%t_5+eWc*h+YbT-VK2?gWD`l-cH)%$tN(wXvih_miRRm6MRo$h@TVkrueEaujHxh5POGM zDl_!=jt@LW8A{`NVDAX#z7gJ$5(^tldCDf{PccCyw>~MiYk~Kq+^09dqh$8&Pp#f* z&F`qy^Q;fLaDy55b>V`JQS*#7?DSf`Sv1&UFi!D{o}z=`V+PQLkzCZz`9|_s1ilS_ zC1EI%n^;TVP<-Gq1I$pm8o*u8Z@6x%YF4`|-4UY;Zrs{y!!+DklH{ literal 0 HcmV?d00001 diff --git a/rpc/factory/factory.proto b/rpc/factory/factory.proto new file mode 100644 index 0000000..d2a0847 --- /dev/null +++ b/rpc/factory/factory.proto @@ -0,0 +1,217 @@ +syntax = "proto3"; + +package factory; +option go_package="./factory"; +import "google/api/annotations.proto"; + + +message GroupCreateRequest { + string name =1; + string account =2; + string password =3; +} + +message GroupEditRequest { + int64 id = 1; + string name =2; + string account =3; + string password =4; +} + +message GroupItemsRequest { + int32 page = 1; + int32 size =2; + int32 status =3; + string name =4; +} + +message GroupPasswordRequest { + int64 id = 1; + string password =2; +} + +message EmptyRequest { +} + +message IdRequest { + int64 id = 1; +} + +message StatusRequest { + int64 id = 1; + int32 status = 2; + string reason = 3; +} + +message Response { + int32 code = 1; + string msg = 2; + string data = 3; +} + +message PostCreateRequest { + string name =1; +} + +message PostEditRequest { + int64 id = 1; + string name =2; +} + +message LogItemsRequest { + int32 page = 1; + int32 size =2; + int32 type =3; + int32 obj_type =4; + repeated string time =5; +} + +message WorkerCreateRequest { + string name =1; + string mobile =2; + string group_id =3; + string post_id = 4; +} + +message WorkerEditRequest { + int64 id = 1; + string name =2; + string mobile =3; + int64 group_id =4; + int64 post_id = 5; +} + +message WorkerItemsRequest { + int32 page = 1; + int32 size =2; + string name =3; + int64 group_id =4; + int64 post_id = 5; + string mobile =6; +} + + +service Factory { + rpc GroupItems(GroupItemsRequest) returns(Response){ + option (google.api.http) = { + get: "/admin/v3/group/items" + body: "*" + }; + }; + rpc GroupInfo(IdRequest) returns(Response){ + option (google.api.http) = { + get: "/admin/v3/group/info" + body: "*" + }; + }; + rpc GroupCreate(GroupCreateRequest) returns(Response){ + option (google.api.http) = { + post: "/admin/v3/group/create" + body: "*" + }; + }; + rpc GroupEdit(GroupEditRequest) returns(Response){ + option (google.api.http) = { + post: "/admin/v3/group/edit" + body: "*" + }; + }; + rpc GroupStatus(StatusRequest) returns(Response){ + option (google.api.http) = { + post: "/admin/v3/group/status" + body: "*" + }; + }; + rpc GroupNames(EmptyRequest) returns(Response){ + option (google.api.http) = { + get: "/admin/v3/group/names" + body: "*" + }; + }; + rpc GroupPassword(GroupPasswordRequest) returns(Response){ + option (google.api.http) = { + post: "/admin/v3/group/password" + body: "*" + }; + }; + + rpc PostItems(EmptyRequest) returns(Response){ + option (google.api.http) = { + get: "/admin/v3/post/items" + body: "*" + }; + }; + rpc PostInfo(IdRequest) returns(Response){ + option (google.api.http) = { + get: "/admin/v3/post/info" + body: "*" + }; + }; + rpc PostCreate(PostCreateRequest) returns(Response){ + option (google.api.http) = { + post: "/admin/v3/post/create" + body: "*" + }; + }; + rpc PostEdit(PostEditRequest) returns(Response){ + option (google.api.http) = { + post: "/admin/v3/post/edit" + body: "*" + }; + }; + rpc PostStatus(StatusRequest) returns(Response){ + option (google.api.http) = { + post: "/admin/v3/post/status" + body: "*" + }; + }; + rpc PostNames(EmptyRequest) returns(Response){ + option (google.api.http) = { + get: "/admin/v3/post/names" + body: "*" + }; + }; + rpc LogItems(LogItemsRequest) returns(Response){ + option (google.api.http) = { + get: "/admin/v3/log/items" + body: "*" + }; + }; + + rpc WorkerCreate(WorkerCreateRequest) returns(Response){ + option (google.api.http) = { + post: "/admin/v3/worker/create" + body: "*" + }; + }; + rpc WorkerEdit(WorkerEditRequest) returns(Response){ + option (google.api.http) = { + post: "/admin/v3/worker/edit" + body: "*" + }; + }; + rpc WorkerStatus(StatusRequest) returns(Response){ + option (google.api.http) = { + post: "/admin/v3/worker/status" + body: "*" + }; + }; + rpc WorkerNames(EmptyRequest) returns(Response){ + option (google.api.http) = { + get: "/admin/v3/worker/names" + body: "*" + }; + }; + rpc WorkerItems(WorkerItemsRequest) returns(Response){ + option (google.api.http) = { + get: "/admin/v3/worker/items" + body: "*" + }; + }; + rpc WorkerInfo(IdRequest) returns(Response){ + option (google.api.http) = { + get: "/admin/v3/worker/info" + body: "*" + }; + }; +} diff --git a/rpc/factory/pb/factory.pb.go b/rpc/factory/pb/factory.pb.go new file mode 100644 index 0000000..8f6f8dd --- /dev/null +++ b/rpc/factory/pb/factory.pb.go @@ -0,0 +1,1062 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v4.25.8 +// source: factory/factory.proto + +package factory + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GroupCreateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` + Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GroupCreateRequest) Reset() { + *x = GroupCreateRequest{} + mi := &file_factory_factory_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GroupCreateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupCreateRequest) ProtoMessage() {} + +func (x *GroupCreateRequest) ProtoReflect() protoreflect.Message { + mi := &file_factory_factory_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GroupCreateRequest.ProtoReflect.Descriptor instead. +func (*GroupCreateRequest) Descriptor() ([]byte, []int) { + return file_factory_factory_proto_rawDescGZIP(), []int{0} +} + +func (x *GroupCreateRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GroupCreateRequest) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +func (x *GroupCreateRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +type GroupEditRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Account string `protobuf:"bytes,3,opt,name=account,proto3" json:"account,omitempty"` + Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GroupEditRequest) Reset() { + *x = GroupEditRequest{} + mi := &file_factory_factory_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GroupEditRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupEditRequest) ProtoMessage() {} + +func (x *GroupEditRequest) ProtoReflect() protoreflect.Message { + mi := &file_factory_factory_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GroupEditRequest.ProtoReflect.Descriptor instead. +func (*GroupEditRequest) Descriptor() ([]byte, []int) { + return file_factory_factory_proto_rawDescGZIP(), []int{1} +} + +func (x *GroupEditRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *GroupEditRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *GroupEditRequest) GetAccount() string { + if x != nil { + return x.Account + } + return "" +} + +func (x *GroupEditRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +type GroupItemsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` + Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` + Status int32 `protobuf:"varint,3,opt,name=status,proto3" json:"status,omitempty"` + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GroupItemsRequest) Reset() { + *x = GroupItemsRequest{} + mi := &file_factory_factory_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GroupItemsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupItemsRequest) ProtoMessage() {} + +func (x *GroupItemsRequest) ProtoReflect() protoreflect.Message { + mi := &file_factory_factory_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GroupItemsRequest.ProtoReflect.Descriptor instead. +func (*GroupItemsRequest) Descriptor() ([]byte, []int) { + return file_factory_factory_proto_rawDescGZIP(), []int{2} +} + +func (x *GroupItemsRequest) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *GroupItemsRequest) GetSize() int32 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *GroupItemsRequest) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *GroupItemsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GroupPasswordRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GroupPasswordRequest) Reset() { + *x = GroupPasswordRequest{} + mi := &file_factory_factory_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GroupPasswordRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GroupPasswordRequest) ProtoMessage() {} + +func (x *GroupPasswordRequest) ProtoReflect() protoreflect.Message { + mi := &file_factory_factory_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GroupPasswordRequest.ProtoReflect.Descriptor instead. +func (*GroupPasswordRequest) Descriptor() ([]byte, []int) { + return file_factory_factory_proto_rawDescGZIP(), []int{3} +} + +func (x *GroupPasswordRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *GroupPasswordRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +type EmptyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EmptyRequest) Reset() { + *x = EmptyRequest{} + mi := &file_factory_factory_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EmptyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmptyRequest) ProtoMessage() {} + +func (x *EmptyRequest) ProtoReflect() protoreflect.Message { + mi := &file_factory_factory_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmptyRequest.ProtoReflect.Descriptor instead. +func (*EmptyRequest) Descriptor() ([]byte, []int) { + return file_factory_factory_proto_rawDescGZIP(), []int{4} +} + +type IdRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IdRequest) Reset() { + *x = IdRequest{} + mi := &file_factory_factory_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IdRequest) ProtoMessage() {} + +func (x *IdRequest) ProtoReflect() protoreflect.Message { + mi := &file_factory_factory_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IdRequest.ProtoReflect.Descriptor instead. +func (*IdRequest) Descriptor() ([]byte, []int) { + return file_factory_factory_proto_rawDescGZIP(), []int{5} +} + +func (x *IdRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +type StatusRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` + Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StatusRequest) Reset() { + *x = StatusRequest{} + mi := &file_factory_factory_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatusRequest) ProtoMessage() {} + +func (x *StatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_factory_factory_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead. +func (*StatusRequest) Descriptor() ([]byte, []int) { + return file_factory_factory_proto_rawDescGZIP(), []int{6} +} + +func (x *StatusRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *StatusRequest) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *StatusRequest) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +type Response struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` + Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Response) Reset() { + *x = Response{} + mi := &file_factory_factory_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Response) ProtoMessage() {} + +func (x *Response) ProtoReflect() protoreflect.Message { + mi := &file_factory_factory_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Response.ProtoReflect.Descriptor instead. +func (*Response) Descriptor() ([]byte, []int) { + return file_factory_factory_proto_rawDescGZIP(), []int{7} +} + +func (x *Response) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *Response) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +func (x *Response) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +type PostCreateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PostCreateRequest) Reset() { + *x = PostCreateRequest{} + mi := &file_factory_factory_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PostCreateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostCreateRequest) ProtoMessage() {} + +func (x *PostCreateRequest) ProtoReflect() protoreflect.Message { + mi := &file_factory_factory_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostCreateRequest.ProtoReflect.Descriptor instead. +func (*PostCreateRequest) Descriptor() ([]byte, []int) { + return file_factory_factory_proto_rawDescGZIP(), []int{8} +} + +func (x *PostCreateRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type PostEditRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PostEditRequest) Reset() { + *x = PostEditRequest{} + mi := &file_factory_factory_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PostEditRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PostEditRequest) ProtoMessage() {} + +func (x *PostEditRequest) ProtoReflect() protoreflect.Message { + mi := &file_factory_factory_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PostEditRequest.ProtoReflect.Descriptor instead. +func (*PostEditRequest) Descriptor() ([]byte, []int) { + return file_factory_factory_proto_rawDescGZIP(), []int{9} +} + +func (x *PostEditRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *PostEditRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type LogItemsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` + Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` + Type int32 `protobuf:"varint,3,opt,name=type,proto3" json:"type,omitempty"` + ObjType int32 `protobuf:"varint,4,opt,name=obj_type,json=objType,proto3" json:"obj_type,omitempty"` + Time []string `protobuf:"bytes,5,rep,name=time,proto3" json:"time,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *LogItemsRequest) Reset() { + *x = LogItemsRequest{} + mi := &file_factory_factory_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *LogItemsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LogItemsRequest) ProtoMessage() {} + +func (x *LogItemsRequest) ProtoReflect() protoreflect.Message { + mi := &file_factory_factory_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LogItemsRequest.ProtoReflect.Descriptor instead. +func (*LogItemsRequest) Descriptor() ([]byte, []int) { + return file_factory_factory_proto_rawDescGZIP(), []int{10} +} + +func (x *LogItemsRequest) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *LogItemsRequest) GetSize() int32 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *LogItemsRequest) GetType() int32 { + if x != nil { + return x.Type + } + return 0 +} + +func (x *LogItemsRequest) GetObjType() int32 { + if x != nil { + return x.ObjType + } + return 0 +} + +func (x *LogItemsRequest) GetTime() []string { + if x != nil { + return x.Time + } + return nil +} + +type WorkerCreateRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Mobile string `protobuf:"bytes,2,opt,name=mobile,proto3" json:"mobile,omitempty"` + GroupId string `protobuf:"bytes,3,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + PostId string `protobuf:"bytes,4,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkerCreateRequest) Reset() { + *x = WorkerCreateRequest{} + mi := &file_factory_factory_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkerCreateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkerCreateRequest) ProtoMessage() {} + +func (x *WorkerCreateRequest) ProtoReflect() protoreflect.Message { + mi := &file_factory_factory_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkerCreateRequest.ProtoReflect.Descriptor instead. +func (*WorkerCreateRequest) Descriptor() ([]byte, []int) { + return file_factory_factory_proto_rawDescGZIP(), []int{11} +} + +func (x *WorkerCreateRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *WorkerCreateRequest) GetMobile() string { + if x != nil { + return x.Mobile + } + return "" +} + +func (x *WorkerCreateRequest) GetGroupId() string { + if x != nil { + return x.GroupId + } + return "" +} + +func (x *WorkerCreateRequest) GetPostId() string { + if x != nil { + return x.PostId + } + return "" +} + +type WorkerEditRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Mobile string `protobuf:"bytes,3,opt,name=mobile,proto3" json:"mobile,omitempty"` + GroupId int64 `protobuf:"varint,4,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + PostId int64 `protobuf:"varint,5,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkerEditRequest) Reset() { + *x = WorkerEditRequest{} + mi := &file_factory_factory_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkerEditRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkerEditRequest) ProtoMessage() {} + +func (x *WorkerEditRequest) ProtoReflect() protoreflect.Message { + mi := &file_factory_factory_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkerEditRequest.ProtoReflect.Descriptor instead. +func (*WorkerEditRequest) Descriptor() ([]byte, []int) { + return file_factory_factory_proto_rawDescGZIP(), []int{12} +} + +func (x *WorkerEditRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *WorkerEditRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *WorkerEditRequest) GetMobile() string { + if x != nil { + return x.Mobile + } + return "" +} + +func (x *WorkerEditRequest) GetGroupId() int64 { + if x != nil { + return x.GroupId + } + return 0 +} + +func (x *WorkerEditRequest) GetPostId() int64 { + if x != nil { + return x.PostId + } + return 0 +} + +type WorkerItemsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Page int32 `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"` + Size int32 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + GroupId int64 `protobuf:"varint,4,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` + PostId int64 `protobuf:"varint,5,opt,name=post_id,json=postId,proto3" json:"post_id,omitempty"` + Mobile string `protobuf:"bytes,6,opt,name=mobile,proto3" json:"mobile,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WorkerItemsRequest) Reset() { + *x = WorkerItemsRequest{} + mi := &file_factory_factory_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WorkerItemsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WorkerItemsRequest) ProtoMessage() {} + +func (x *WorkerItemsRequest) ProtoReflect() protoreflect.Message { + mi := &file_factory_factory_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WorkerItemsRequest.ProtoReflect.Descriptor instead. +func (*WorkerItemsRequest) Descriptor() ([]byte, []int) { + return file_factory_factory_proto_rawDescGZIP(), []int{13} +} + +func (x *WorkerItemsRequest) GetPage() int32 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *WorkerItemsRequest) GetSize() int32 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *WorkerItemsRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *WorkerItemsRequest) GetGroupId() int64 { + if x != nil { + return x.GroupId + } + return 0 +} + +func (x *WorkerItemsRequest) GetPostId() int64 { + if x != nil { + return x.PostId + } + return 0 +} + +func (x *WorkerItemsRequest) GetMobile() string { + if x != nil { + return x.Mobile + } + return "" +} + +var File_factory_factory_proto protoreflect.FileDescriptor + +const file_factory_factory_proto_rawDesc = "" + + "\n" + + "\x15factory/factory.proto\x12\afactory\x1a\x1cgoogle/api/annotations.proto\"^\n" + + "\x12GroupCreateRequest\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x18\n" + + "\aaccount\x18\x02 \x01(\tR\aaccount\x12\x1a\n" + + "\bpassword\x18\x03 \x01(\tR\bpassword\"l\n" + + "\x10GroupEditRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x18\n" + + "\aaccount\x18\x03 \x01(\tR\aaccount\x12\x1a\n" + + "\bpassword\x18\x04 \x01(\tR\bpassword\"g\n" + + "\x11GroupItemsRequest\x12\x12\n" + + "\x04page\x18\x01 \x01(\x05R\x04page\x12\x12\n" + + "\x04size\x18\x02 \x01(\x05R\x04size\x12\x16\n" + + "\x06status\x18\x03 \x01(\x05R\x06status\x12\x12\n" + + "\x04name\x18\x04 \x01(\tR\x04name\"B\n" + + "\x14GroupPasswordRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + + "\bpassword\x18\x02 \x01(\tR\bpassword\"\x0e\n" + + "\fEmptyRequest\"\x1b\n" + + "\tIdRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\"O\n" + + "\rStatusRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x16\n" + + "\x06status\x18\x02 \x01(\x05R\x06status\x12\x16\n" + + "\x06reason\x18\x03 \x01(\tR\x06reason\"D\n" + + "\bResponse\x12\x12\n" + + "\x04code\x18\x01 \x01(\x05R\x04code\x12\x10\n" + + "\x03msg\x18\x02 \x01(\tR\x03msg\x12\x12\n" + + "\x04data\x18\x03 \x01(\tR\x04data\"'\n" + + "\x11PostCreateRequest\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\"5\n" + + "\x0fPostEditRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\"|\n" + + "\x0fLogItemsRequest\x12\x12\n" + + "\x04page\x18\x01 \x01(\x05R\x04page\x12\x12\n" + + "\x04size\x18\x02 \x01(\x05R\x04size\x12\x12\n" + + "\x04type\x18\x03 \x01(\x05R\x04type\x12\x19\n" + + "\bobj_type\x18\x04 \x01(\x05R\aobjType\x12\x12\n" + + "\x04time\x18\x05 \x03(\tR\x04time\"u\n" + + "\x13WorkerCreateRequest\x12\x12\n" + + "\x04name\x18\x01 \x01(\tR\x04name\x12\x16\n" + + "\x06mobile\x18\x02 \x01(\tR\x06mobile\x12\x19\n" + + "\bgroup_id\x18\x03 \x01(\tR\agroupId\x12\x17\n" + + "\apost_id\x18\x04 \x01(\tR\x06postId\"\x83\x01\n" + + "\x11WorkerEditRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x12\n" + + "\x04name\x18\x02 \x01(\tR\x04name\x12\x16\n" + + "\x06mobile\x18\x03 \x01(\tR\x06mobile\x12\x19\n" + + "\bgroup_id\x18\x04 \x01(\x03R\agroupId\x12\x17\n" + + "\apost_id\x18\x05 \x01(\x03R\x06postId\"\x9c\x01\n" + + "\x12WorkerItemsRequest\x12\x12\n" + + "\x04page\x18\x01 \x01(\x05R\x04page\x12\x12\n" + + "\x04size\x18\x02 \x01(\x05R\x04size\x12\x12\n" + + "\x04name\x18\x03 \x01(\tR\x04name\x12\x19\n" + + "\bgroup_id\x18\x04 \x01(\x03R\agroupId\x12\x17\n" + + "\apost_id\x18\x05 \x01(\x03R\x06postId\x12\x16\n" + + "\x06mobile\x18\x06 \x01(\tR\x06mobile2\xc1\x0e\n" + + "\aFactory\x12]\n" + + "\n" + + "GroupItems\x12\x1a.factory.GroupItemsRequest\x1a\x11.factory.Response\" \x82\xd3\xe4\x93\x02\x1a:\x01*\x12\x15/admin/v3/group/items\x12S\n" + + "\tGroupInfo\x12\x12.factory.IdRequest\x1a\x11.factory.Response\"\x1f\x82\xd3\xe4\x93\x02\x19:\x01*\x12\x14/admin/v3/group/info\x12`\n" + + "\vGroupCreate\x12\x1b.factory.GroupCreateRequest\x1a\x11.factory.Response\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/admin/v3/group/create\x12Z\n" + + "\tGroupEdit\x12\x19.factory.GroupEditRequest\x1a\x11.factory.Response\"\x1f\x82\xd3\xe4\x93\x02\x19:\x01*\"\x14/admin/v3/group/edit\x12[\n" + + "\vGroupStatus\x12\x16.factory.StatusRequest\x1a\x11.factory.Response\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/admin/v3/group/status\x12X\n" + + "\n" + + "GroupNames\x12\x15.factory.EmptyRequest\x1a\x11.factory.Response\" \x82\xd3\xe4\x93\x02\x1a:\x01*\x12\x15/admin/v3/group/names\x12f\n" + + "\rGroupPassword\x12\x1d.factory.GroupPasswordRequest\x1a\x11.factory.Response\"#\x82\xd3\xe4\x93\x02\x1d:\x01*\"\x18/admin/v3/group/password\x12V\n" + + "\tPostItems\x12\x15.factory.EmptyRequest\x1a\x11.factory.Response\"\x1f\x82\xd3\xe4\x93\x02\x19:\x01*\x12\x14/admin/v3/post/items\x12Q\n" + + "\bPostInfo\x12\x12.factory.IdRequest\x1a\x11.factory.Response\"\x1e\x82\xd3\xe4\x93\x02\x18:\x01*\x12\x13/admin/v3/post/info\x12]\n" + + "\n" + + "PostCreate\x12\x1a.factory.PostCreateRequest\x1a\x11.factory.Response\" \x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/admin/v3/post/create\x12W\n" + + "\bPostEdit\x12\x18.factory.PostEditRequest\x1a\x11.factory.Response\"\x1e\x82\xd3\xe4\x93\x02\x18:\x01*\"\x13/admin/v3/post/edit\x12Y\n" + + "\n" + + "PostStatus\x12\x16.factory.StatusRequest\x1a\x11.factory.Response\" \x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/admin/v3/post/status\x12V\n" + + "\tPostNames\x12\x15.factory.EmptyRequest\x1a\x11.factory.Response\"\x1f\x82\xd3\xe4\x93\x02\x19:\x01*\x12\x14/admin/v3/post/names\x12W\n" + + "\bLogItems\x12\x18.factory.LogItemsRequest\x1a\x11.factory.Response\"\x1e\x82\xd3\xe4\x93\x02\x18:\x01*\x12\x13/admin/v3/log/items\x12c\n" + + "\fWorkerCreate\x12\x1c.factory.WorkerCreateRequest\x1a\x11.factory.Response\"\"\x82\xd3\xe4\x93\x02\x1c:\x01*\"\x17/admin/v3/worker/create\x12]\n" + + "\n" + + "WorkerEdit\x12\x1a.factory.WorkerEditRequest\x1a\x11.factory.Response\" \x82\xd3\xe4\x93\x02\x1a:\x01*\"\x15/admin/v3/worker/edit\x12]\n" + + "\fWorkerStatus\x12\x16.factory.StatusRequest\x1a\x11.factory.Response\"\"\x82\xd3\xe4\x93\x02\x1c:\x01*\"\x17/admin/v3/worker/status\x12Z\n" + + "\vWorkerNames\x12\x15.factory.EmptyRequest\x1a\x11.factory.Response\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\x12\x16/admin/v3/worker/names\x12`\n" + + "\vWorkerItems\x12\x1b.factory.WorkerItemsRequest\x1a\x11.factory.Response\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\x12\x16/admin/v3/worker/items\x12U\n" + + "\n" + + "WorkerInfo\x12\x12.factory.IdRequest\x1a\x11.factory.Response\" \x82\xd3\xe4\x93\x02\x1a:\x01*\x12\x15/admin/v3/worker/infoB\vZ\t./factoryb\x06proto3" + +var ( + file_factory_factory_proto_rawDescOnce sync.Once + file_factory_factory_proto_rawDescData []byte +) + +func file_factory_factory_proto_rawDescGZIP() []byte { + file_factory_factory_proto_rawDescOnce.Do(func() { + file_factory_factory_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_factory_factory_proto_rawDesc), len(file_factory_factory_proto_rawDesc))) + }) + return file_factory_factory_proto_rawDescData +} + +var file_factory_factory_proto_msgTypes = make([]protoimpl.MessageInfo, 14) +var file_factory_factory_proto_goTypes = []any{ + (*GroupCreateRequest)(nil), // 0: factory.GroupCreateRequest + (*GroupEditRequest)(nil), // 1: factory.GroupEditRequest + (*GroupItemsRequest)(nil), // 2: factory.GroupItemsRequest + (*GroupPasswordRequest)(nil), // 3: factory.GroupPasswordRequest + (*EmptyRequest)(nil), // 4: factory.EmptyRequest + (*IdRequest)(nil), // 5: factory.IdRequest + (*StatusRequest)(nil), // 6: factory.StatusRequest + (*Response)(nil), // 7: factory.Response + (*PostCreateRequest)(nil), // 8: factory.PostCreateRequest + (*PostEditRequest)(nil), // 9: factory.PostEditRequest + (*LogItemsRequest)(nil), // 10: factory.LogItemsRequest + (*WorkerCreateRequest)(nil), // 11: factory.WorkerCreateRequest + (*WorkerEditRequest)(nil), // 12: factory.WorkerEditRequest + (*WorkerItemsRequest)(nil), // 13: factory.WorkerItemsRequest +} +var file_factory_factory_proto_depIdxs = []int32{ + 2, // 0: factory.Factory.GroupItems:input_type -> factory.GroupItemsRequest + 5, // 1: factory.Factory.GroupInfo:input_type -> factory.IdRequest + 0, // 2: factory.Factory.GroupCreate:input_type -> factory.GroupCreateRequest + 1, // 3: factory.Factory.GroupEdit:input_type -> factory.GroupEditRequest + 6, // 4: factory.Factory.GroupStatus:input_type -> factory.StatusRequest + 4, // 5: factory.Factory.GroupNames:input_type -> factory.EmptyRequest + 3, // 6: factory.Factory.GroupPassword:input_type -> factory.GroupPasswordRequest + 4, // 7: factory.Factory.PostItems:input_type -> factory.EmptyRequest + 5, // 8: factory.Factory.PostInfo:input_type -> factory.IdRequest + 8, // 9: factory.Factory.PostCreate:input_type -> factory.PostCreateRequest + 9, // 10: factory.Factory.PostEdit:input_type -> factory.PostEditRequest + 6, // 11: factory.Factory.PostStatus:input_type -> factory.StatusRequest + 4, // 12: factory.Factory.PostNames:input_type -> factory.EmptyRequest + 10, // 13: factory.Factory.LogItems:input_type -> factory.LogItemsRequest + 11, // 14: factory.Factory.WorkerCreate:input_type -> factory.WorkerCreateRequest + 12, // 15: factory.Factory.WorkerEdit:input_type -> factory.WorkerEditRequest + 6, // 16: factory.Factory.WorkerStatus:input_type -> factory.StatusRequest + 4, // 17: factory.Factory.WorkerNames:input_type -> factory.EmptyRequest + 13, // 18: factory.Factory.WorkerItems:input_type -> factory.WorkerItemsRequest + 5, // 19: factory.Factory.WorkerInfo:input_type -> factory.IdRequest + 7, // 20: factory.Factory.GroupItems:output_type -> factory.Response + 7, // 21: factory.Factory.GroupInfo:output_type -> factory.Response + 7, // 22: factory.Factory.GroupCreate:output_type -> factory.Response + 7, // 23: factory.Factory.GroupEdit:output_type -> factory.Response + 7, // 24: factory.Factory.GroupStatus:output_type -> factory.Response + 7, // 25: factory.Factory.GroupNames:output_type -> factory.Response + 7, // 26: factory.Factory.GroupPassword:output_type -> factory.Response + 7, // 27: factory.Factory.PostItems:output_type -> factory.Response + 7, // 28: factory.Factory.PostInfo:output_type -> factory.Response + 7, // 29: factory.Factory.PostCreate:output_type -> factory.Response + 7, // 30: factory.Factory.PostEdit:output_type -> factory.Response + 7, // 31: factory.Factory.PostStatus:output_type -> factory.Response + 7, // 32: factory.Factory.PostNames:output_type -> factory.Response + 7, // 33: factory.Factory.LogItems:output_type -> factory.Response + 7, // 34: factory.Factory.WorkerCreate:output_type -> factory.Response + 7, // 35: factory.Factory.WorkerEdit:output_type -> factory.Response + 7, // 36: factory.Factory.WorkerStatus:output_type -> factory.Response + 7, // 37: factory.Factory.WorkerNames:output_type -> factory.Response + 7, // 38: factory.Factory.WorkerItems:output_type -> factory.Response + 7, // 39: factory.Factory.WorkerInfo:output_type -> factory.Response + 20, // [20:40] is the sub-list for method output_type + 0, // [0:20] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_factory_factory_proto_init() } +func file_factory_factory_proto_init() { + if File_factory_factory_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_factory_factory_proto_rawDesc), len(file_factory_factory_proto_rawDesc)), + NumEnums: 0, + NumMessages: 14, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_factory_factory_proto_goTypes, + DependencyIndexes: file_factory_factory_proto_depIdxs, + MessageInfos: file_factory_factory_proto_msgTypes, + }.Build() + File_factory_factory_proto = out.File + file_factory_factory_proto_goTypes = nil + file_factory_factory_proto_depIdxs = nil +} diff --git a/rpc/factory/pb/factory_grpc.pb.go b/rpc/factory/pb/factory_grpc.pb.go new file mode 100644 index 0000000..57a704d --- /dev/null +++ b/rpc/factory/pb/factory_grpc.pb.go @@ -0,0 +1,843 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v4.25.8 +// source: factory/factory.proto + +package factory + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Factory_GroupItems_FullMethodName = "/factory.Factory/GroupItems" + Factory_GroupInfo_FullMethodName = "/factory.Factory/GroupInfo" + Factory_GroupCreate_FullMethodName = "/factory.Factory/GroupCreate" + Factory_GroupEdit_FullMethodName = "/factory.Factory/GroupEdit" + Factory_GroupStatus_FullMethodName = "/factory.Factory/GroupStatus" + Factory_GroupNames_FullMethodName = "/factory.Factory/GroupNames" + Factory_GroupPassword_FullMethodName = "/factory.Factory/GroupPassword" + Factory_PostItems_FullMethodName = "/factory.Factory/PostItems" + Factory_PostInfo_FullMethodName = "/factory.Factory/PostInfo" + Factory_PostCreate_FullMethodName = "/factory.Factory/PostCreate" + Factory_PostEdit_FullMethodName = "/factory.Factory/PostEdit" + Factory_PostStatus_FullMethodName = "/factory.Factory/PostStatus" + Factory_PostNames_FullMethodName = "/factory.Factory/PostNames" + Factory_LogItems_FullMethodName = "/factory.Factory/LogItems" + Factory_WorkerCreate_FullMethodName = "/factory.Factory/WorkerCreate" + Factory_WorkerEdit_FullMethodName = "/factory.Factory/WorkerEdit" + Factory_WorkerStatus_FullMethodName = "/factory.Factory/WorkerStatus" + Factory_WorkerNames_FullMethodName = "/factory.Factory/WorkerNames" + Factory_WorkerItems_FullMethodName = "/factory.Factory/WorkerItems" + Factory_WorkerInfo_FullMethodName = "/factory.Factory/WorkerInfo" +) + +// FactoryClient is the client API for Factory service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type FactoryClient interface { + GroupItems(ctx context.Context, in *GroupItemsRequest, opts ...grpc.CallOption) (*Response, error) + GroupInfo(ctx context.Context, in *IdRequest, opts ...grpc.CallOption) (*Response, error) + GroupCreate(ctx context.Context, in *GroupCreateRequest, opts ...grpc.CallOption) (*Response, error) + GroupEdit(ctx context.Context, in *GroupEditRequest, opts ...grpc.CallOption) (*Response, error) + GroupStatus(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*Response, error) + GroupNames(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*Response, error) + GroupPassword(ctx context.Context, in *GroupPasswordRequest, opts ...grpc.CallOption) (*Response, error) + PostItems(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*Response, error) + PostInfo(ctx context.Context, in *IdRequest, opts ...grpc.CallOption) (*Response, error) + PostCreate(ctx context.Context, in *PostCreateRequest, opts ...grpc.CallOption) (*Response, error) + PostEdit(ctx context.Context, in *PostEditRequest, opts ...grpc.CallOption) (*Response, error) + PostStatus(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*Response, error) + PostNames(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*Response, error) + LogItems(ctx context.Context, in *LogItemsRequest, opts ...grpc.CallOption) (*Response, error) + WorkerCreate(ctx context.Context, in *WorkerCreateRequest, opts ...grpc.CallOption) (*Response, error) + WorkerEdit(ctx context.Context, in *WorkerEditRequest, opts ...grpc.CallOption) (*Response, error) + WorkerStatus(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*Response, error) + WorkerNames(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*Response, error) + WorkerItems(ctx context.Context, in *WorkerItemsRequest, opts ...grpc.CallOption) (*Response, error) + WorkerInfo(ctx context.Context, in *IdRequest, opts ...grpc.CallOption) (*Response, error) +} + +type factoryClient struct { + cc grpc.ClientConnInterface +} + +func NewFactoryClient(cc grpc.ClientConnInterface) FactoryClient { + return &factoryClient{cc} +} + +func (c *factoryClient) GroupItems(ctx context.Context, in *GroupItemsRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Factory_GroupItems_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *factoryClient) GroupInfo(ctx context.Context, in *IdRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Factory_GroupInfo_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *factoryClient) GroupCreate(ctx context.Context, in *GroupCreateRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Factory_GroupCreate_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *factoryClient) GroupEdit(ctx context.Context, in *GroupEditRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Factory_GroupEdit_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *factoryClient) GroupStatus(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Factory_GroupStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *factoryClient) GroupNames(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Factory_GroupNames_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *factoryClient) GroupPassword(ctx context.Context, in *GroupPasswordRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Factory_GroupPassword_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *factoryClient) PostItems(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Factory_PostItems_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *factoryClient) PostInfo(ctx context.Context, in *IdRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Factory_PostInfo_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *factoryClient) PostCreate(ctx context.Context, in *PostCreateRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Factory_PostCreate_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *factoryClient) PostEdit(ctx context.Context, in *PostEditRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Factory_PostEdit_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *factoryClient) PostStatus(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Factory_PostStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *factoryClient) PostNames(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Factory_PostNames_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *factoryClient) LogItems(ctx context.Context, in *LogItemsRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Factory_LogItems_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *factoryClient) WorkerCreate(ctx context.Context, in *WorkerCreateRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Factory_WorkerCreate_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *factoryClient) WorkerEdit(ctx context.Context, in *WorkerEditRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Factory_WorkerEdit_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *factoryClient) WorkerStatus(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Factory_WorkerStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *factoryClient) WorkerNames(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Factory_WorkerNames_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *factoryClient) WorkerItems(ctx context.Context, in *WorkerItemsRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Factory_WorkerItems_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *factoryClient) WorkerInfo(ctx context.Context, in *IdRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Factory_WorkerInfo_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// FactoryServer is the server API for Factory service. +// All implementations must embed UnimplementedFactoryServer +// for forward compatibility. +type FactoryServer interface { + GroupItems(context.Context, *GroupItemsRequest) (*Response, error) + GroupInfo(context.Context, *IdRequest) (*Response, error) + GroupCreate(context.Context, *GroupCreateRequest) (*Response, error) + GroupEdit(context.Context, *GroupEditRequest) (*Response, error) + GroupStatus(context.Context, *StatusRequest) (*Response, error) + GroupNames(context.Context, *EmptyRequest) (*Response, error) + GroupPassword(context.Context, *GroupPasswordRequest) (*Response, error) + PostItems(context.Context, *EmptyRequest) (*Response, error) + PostInfo(context.Context, *IdRequest) (*Response, error) + PostCreate(context.Context, *PostCreateRequest) (*Response, error) + PostEdit(context.Context, *PostEditRequest) (*Response, error) + PostStatus(context.Context, *StatusRequest) (*Response, error) + PostNames(context.Context, *EmptyRequest) (*Response, error) + LogItems(context.Context, *LogItemsRequest) (*Response, error) + WorkerCreate(context.Context, *WorkerCreateRequest) (*Response, error) + WorkerEdit(context.Context, *WorkerEditRequest) (*Response, error) + WorkerStatus(context.Context, *StatusRequest) (*Response, error) + WorkerNames(context.Context, *EmptyRequest) (*Response, error) + WorkerItems(context.Context, *WorkerItemsRequest) (*Response, error) + WorkerInfo(context.Context, *IdRequest) (*Response, error) + mustEmbedUnimplementedFactoryServer() +} + +// UnimplementedFactoryServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedFactoryServer struct{} + +func (UnimplementedFactoryServer) GroupItems(context.Context, *GroupItemsRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method GroupItems not implemented") +} +func (UnimplementedFactoryServer) GroupInfo(context.Context, *IdRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method GroupInfo not implemented") +} +func (UnimplementedFactoryServer) GroupCreate(context.Context, *GroupCreateRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method GroupCreate not implemented") +} +func (UnimplementedFactoryServer) GroupEdit(context.Context, *GroupEditRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method GroupEdit not implemented") +} +func (UnimplementedFactoryServer) GroupStatus(context.Context, *StatusRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method GroupStatus not implemented") +} +func (UnimplementedFactoryServer) GroupNames(context.Context, *EmptyRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method GroupNames not implemented") +} +func (UnimplementedFactoryServer) GroupPassword(context.Context, *GroupPasswordRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method GroupPassword not implemented") +} +func (UnimplementedFactoryServer) PostItems(context.Context, *EmptyRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method PostItems not implemented") +} +func (UnimplementedFactoryServer) PostInfo(context.Context, *IdRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method PostInfo not implemented") +} +func (UnimplementedFactoryServer) PostCreate(context.Context, *PostCreateRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method PostCreate not implemented") +} +func (UnimplementedFactoryServer) PostEdit(context.Context, *PostEditRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method PostEdit not implemented") +} +func (UnimplementedFactoryServer) PostStatus(context.Context, *StatusRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method PostStatus not implemented") +} +func (UnimplementedFactoryServer) PostNames(context.Context, *EmptyRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method PostNames not implemented") +} +func (UnimplementedFactoryServer) LogItems(context.Context, *LogItemsRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method LogItems not implemented") +} +func (UnimplementedFactoryServer) WorkerCreate(context.Context, *WorkerCreateRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method WorkerCreate not implemented") +} +func (UnimplementedFactoryServer) WorkerEdit(context.Context, *WorkerEditRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method WorkerEdit not implemented") +} +func (UnimplementedFactoryServer) WorkerStatus(context.Context, *StatusRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method WorkerStatus not implemented") +} +func (UnimplementedFactoryServer) WorkerNames(context.Context, *EmptyRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method WorkerNames not implemented") +} +func (UnimplementedFactoryServer) WorkerItems(context.Context, *WorkerItemsRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method WorkerItems not implemented") +} +func (UnimplementedFactoryServer) WorkerInfo(context.Context, *IdRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method WorkerInfo not implemented") +} +func (UnimplementedFactoryServer) mustEmbedUnimplementedFactoryServer() {} +func (UnimplementedFactoryServer) testEmbeddedByValue() {} + +// UnsafeFactoryServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to FactoryServer will +// result in compilation errors. +type UnsafeFactoryServer interface { + mustEmbedUnimplementedFactoryServer() +} + +func RegisterFactoryServer(s grpc.ServiceRegistrar, srv FactoryServer) { + // If the following call panics, it indicates UnimplementedFactoryServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Factory_ServiceDesc, srv) +} + +func _Factory_GroupItems_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GroupItemsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FactoryServer).GroupItems(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Factory_GroupItems_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FactoryServer).GroupItems(ctx, req.(*GroupItemsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Factory_GroupInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FactoryServer).GroupInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Factory_GroupInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FactoryServer).GroupInfo(ctx, req.(*IdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Factory_GroupCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GroupCreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FactoryServer).GroupCreate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Factory_GroupCreate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FactoryServer).GroupCreate(ctx, req.(*GroupCreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Factory_GroupEdit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GroupEditRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FactoryServer).GroupEdit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Factory_GroupEdit_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FactoryServer).GroupEdit(ctx, req.(*GroupEditRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Factory_GroupStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FactoryServer).GroupStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Factory_GroupStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FactoryServer).GroupStatus(ctx, req.(*StatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Factory_GroupNames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EmptyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FactoryServer).GroupNames(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Factory_GroupNames_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FactoryServer).GroupNames(ctx, req.(*EmptyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Factory_GroupPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GroupPasswordRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FactoryServer).GroupPassword(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Factory_GroupPassword_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FactoryServer).GroupPassword(ctx, req.(*GroupPasswordRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Factory_PostItems_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EmptyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FactoryServer).PostItems(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Factory_PostItems_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FactoryServer).PostItems(ctx, req.(*EmptyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Factory_PostInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FactoryServer).PostInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Factory_PostInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FactoryServer).PostInfo(ctx, req.(*IdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Factory_PostCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PostCreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FactoryServer).PostCreate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Factory_PostCreate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FactoryServer).PostCreate(ctx, req.(*PostCreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Factory_PostEdit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PostEditRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FactoryServer).PostEdit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Factory_PostEdit_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FactoryServer).PostEdit(ctx, req.(*PostEditRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Factory_PostStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FactoryServer).PostStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Factory_PostStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FactoryServer).PostStatus(ctx, req.(*StatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Factory_PostNames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EmptyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FactoryServer).PostNames(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Factory_PostNames_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FactoryServer).PostNames(ctx, req.(*EmptyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Factory_LogItems_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LogItemsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FactoryServer).LogItems(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Factory_LogItems_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FactoryServer).LogItems(ctx, req.(*LogItemsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Factory_WorkerCreate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WorkerCreateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FactoryServer).WorkerCreate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Factory_WorkerCreate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FactoryServer).WorkerCreate(ctx, req.(*WorkerCreateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Factory_WorkerEdit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WorkerEditRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FactoryServer).WorkerEdit(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Factory_WorkerEdit_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FactoryServer).WorkerEdit(ctx, req.(*WorkerEditRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Factory_WorkerStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FactoryServer).WorkerStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Factory_WorkerStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FactoryServer).WorkerStatus(ctx, req.(*StatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Factory_WorkerNames_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EmptyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FactoryServer).WorkerNames(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Factory_WorkerNames_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FactoryServer).WorkerNames(ctx, req.(*EmptyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Factory_WorkerItems_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WorkerItemsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FactoryServer).WorkerItems(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Factory_WorkerItems_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FactoryServer).WorkerItems(ctx, req.(*WorkerItemsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Factory_WorkerInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FactoryServer).WorkerInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Factory_WorkerInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FactoryServer).WorkerInfo(ctx, req.(*IdRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Factory_ServiceDesc is the grpc.ServiceDesc for Factory service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Factory_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "factory.Factory", + HandlerType: (*FactoryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GroupItems", + Handler: _Factory_GroupItems_Handler, + }, + { + MethodName: "GroupInfo", + Handler: _Factory_GroupInfo_Handler, + }, + { + MethodName: "GroupCreate", + Handler: _Factory_GroupCreate_Handler, + }, + { + MethodName: "GroupEdit", + Handler: _Factory_GroupEdit_Handler, + }, + { + MethodName: "GroupStatus", + Handler: _Factory_GroupStatus_Handler, + }, + { + MethodName: "GroupNames", + Handler: _Factory_GroupNames_Handler, + }, + { + MethodName: "GroupPassword", + Handler: _Factory_GroupPassword_Handler, + }, + { + MethodName: "PostItems", + Handler: _Factory_PostItems_Handler, + }, + { + MethodName: "PostInfo", + Handler: _Factory_PostInfo_Handler, + }, + { + MethodName: "PostCreate", + Handler: _Factory_PostCreate_Handler, + }, + { + MethodName: "PostEdit", + Handler: _Factory_PostEdit_Handler, + }, + { + MethodName: "PostStatus", + Handler: _Factory_PostStatus_Handler, + }, + { + MethodName: "PostNames", + Handler: _Factory_PostNames_Handler, + }, + { + MethodName: "LogItems", + Handler: _Factory_LogItems_Handler, + }, + { + MethodName: "WorkerCreate", + Handler: _Factory_WorkerCreate_Handler, + }, + { + MethodName: "WorkerEdit", + Handler: _Factory_WorkerEdit_Handler, + }, + { + MethodName: "WorkerStatus", + Handler: _Factory_WorkerStatus_Handler, + }, + { + MethodName: "WorkerNames", + Handler: _Factory_WorkerNames_Handler, + }, + { + MethodName: "WorkerItems", + Handler: _Factory_WorkerItems_Handler, + }, + { + MethodName: "WorkerInfo", + Handler: _Factory_WorkerInfo_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "factory/factory.proto", +} diff --git a/rpc/order/order.pb b/rpc/order/order.pb index e4fdeaa556c18e30adf3a9fbe88474991633c3c2..c1e24fa4b04de913d4d1bce93bd73c7f2467cb29 100644 GIT binary patch delta 594 zcmaFZ&3JnPL~#11Jyx;)Bd9O3lqIiODlqQ$NXO^Vq7E4GgFl%rdN$Y|ArxyT`^8`r+r9x~E;(_V_iz;no zs`CvsZn8NtH#N1SnM}hw2hHCZ$3JHmDu|fif6&yei4k$?TN^_G^ zizL_}K?>m+?c?9P*)Ebz+@FgR98I2iY576|P?vh9Og6MvnEc5_h&vM~ZpEl2l+7gp p3>AsV>aNqHgc7(!k%H6(9>qdRPy>);;gZn!mr}-~X7V;yZ2)-0yhQ*2 delta 107 zcmcaTf$?EC order.OrderItemsRequest - 3, // 1: order.order.WebCreate:input_type -> order.CreateOrderRequest - 4, // 2: order.order.WebCreateOne:input_type -> order.CreateOrderOneRequest - 5, // 3: order.order.WebAddressCreate:input_type -> order.EditAddressRequest - 5, // 4: order.order.WebAddressEdit:input_type -> order.EditAddressRequest - 10, // 5: order.order.WebAddressDel:input_type -> order.IdAndTypeRequest - 10, // 6: order.order.WebAddressDef:input_type -> order.IdAndTypeRequest - 10, // 7: order.order.WebAddressInfo:input_type -> order.IdAndTypeRequest - 11, // 8: order.order.WebAddressItems:input_type -> order.TypeRequest - 8, // 9: order.order.WebCart:input_type -> order.CartRequest - 7, // 10: order.order.WebCartEdit:input_type -> order.EditCartRequest - 12, // 11: order.order.AddressItem:input_type -> order.AddressItemsRequest - 13, // 12: order.order.AddressByStore:input_type -> order.AddressByStoreItemsRequest - 14, // 13: order.order.OrderAuditingItems:input_type -> order.OrderAuditingItemsRequest - 15, // 14: order.order.OrderAuditing:input_type -> order.OrderAuditingRequest - 16, // 15: order.order.OrderCreate:input_type -> order.AdminCreateOrderRequest - 0, // 16: order.order.OrderDown:input_type -> order.OrderItemsRequest - 17, // 17: order.order.UpdateOrderDeliverStatus:input_type -> order.UpdateOrderDeliverStatusRequest - 19, // 18: order.order.GetOrderInfo:input_type -> order.GetOrderInfoRequest - 1, // 19: order.order.Items:output_type -> order.Response - 1, // 20: order.order.WebCreate:output_type -> order.Response - 1, // 21: order.order.WebCreateOne:output_type -> order.Response - 1, // 22: order.order.WebAddressCreate:output_type -> order.Response - 1, // 23: order.order.WebAddressEdit:output_type -> order.Response - 1, // 24: order.order.WebAddressDel:output_type -> order.Response - 1, // 25: order.order.WebAddressDef:output_type -> order.Response - 1, // 26: order.order.WebAddressInfo:output_type -> order.Response - 1, // 27: order.order.WebAddressItems:output_type -> order.Response - 1, // 28: order.order.WebCart:output_type -> order.Response - 1, // 29: order.order.WebCartEdit:output_type -> order.Response - 1, // 30: order.order.AddressItem:output_type -> order.Response - 1, // 31: order.order.AddressByStore:output_type -> order.Response - 1, // 32: order.order.OrderAuditingItems:output_type -> order.Response - 1, // 33: order.order.OrderAuditing:output_type -> order.Response - 1, // 34: order.order.OrderCreate:output_type -> order.Response - 2, // 35: order.order.OrderDown:output_type -> order.ExcelExportResponse - 18, // 36: order.order.UpdateOrderDeliverStatus:output_type -> order.UpdateOrderDeliverStatusResponse - 20, // 37: order.order.GetOrderInfo:output_type -> order.OrderInfoResponse - 19, // [19:38] is the sub-list for method output_type - 0, // [0:19] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name + 23, // 0: order.OrderInfoResponse.product_items:type_name -> order.ProductItemsResponse + 0, // 1: order.order.Items:input_type -> order.OrderItemsRequest + 3, // 2: order.order.WebCreate:input_type -> order.CreateOrderRequest + 4, // 3: order.order.WebCreateOne:input_type -> order.CreateOrderOneRequest + 5, // 4: order.order.WebAddressCreate:input_type -> order.EditAddressRequest + 5, // 5: order.order.WebAddressEdit:input_type -> order.EditAddressRequest + 10, // 6: order.order.WebAddressDel:input_type -> order.IdAndTypeRequest + 10, // 7: order.order.WebAddressDef:input_type -> order.IdAndTypeRequest + 10, // 8: order.order.WebAddressInfo:input_type -> order.IdAndTypeRequest + 11, // 9: order.order.WebAddressItems:input_type -> order.TypeRequest + 8, // 10: order.order.WebCart:input_type -> order.CartRequest + 7, // 11: order.order.WebCartEdit:input_type -> order.EditCartRequest + 12, // 12: order.order.AddressItem:input_type -> order.AddressItemsRequest + 13, // 13: order.order.AddressByStore:input_type -> order.AddressByStoreItemsRequest + 14, // 14: order.order.OrderAuditingItems:input_type -> order.OrderAuditingItemsRequest + 15, // 15: order.order.OrderAuditing:input_type -> order.OrderAuditingRequest + 16, // 16: order.order.OrderCreate:input_type -> order.AdminCreateOrderRequest + 0, // 17: order.order.OrderDown:input_type -> order.OrderItemsRequest + 9, // 18: order.order.OrderInfo:input_type -> order.IdRequest + 17, // 19: order.order.UpdateOrderDeliverStatus:input_type -> order.UpdateOrderDeliverStatusRequest + 21, // 20: order.order.GetOrderInfo:input_type -> order.GetOrderInfoRequest + 18, // 21: order.order.UpdateOrderDPayStatus:input_type -> order.UpdateOrderPayStatusRequest + 1, // 22: order.order.Items:output_type -> order.Response + 1, // 23: order.order.WebCreate:output_type -> order.Response + 1, // 24: order.order.WebCreateOne:output_type -> order.Response + 1, // 25: order.order.WebAddressCreate:output_type -> order.Response + 1, // 26: order.order.WebAddressEdit:output_type -> order.Response + 1, // 27: order.order.WebAddressDel:output_type -> order.Response + 1, // 28: order.order.WebAddressDef:output_type -> order.Response + 1, // 29: order.order.WebAddressInfo:output_type -> order.Response + 1, // 30: order.order.WebAddressItems:output_type -> order.Response + 1, // 31: order.order.WebCart:output_type -> order.Response + 1, // 32: order.order.WebCartEdit:output_type -> order.Response + 1, // 33: order.order.AddressItem:output_type -> order.Response + 1, // 34: order.order.AddressByStore:output_type -> order.Response + 1, // 35: order.order.OrderAuditingItems:output_type -> order.Response + 1, // 36: order.order.OrderAuditing:output_type -> order.Response + 1, // 37: order.order.OrderCreate:output_type -> order.Response + 2, // 38: order.order.OrderDown:output_type -> order.ExcelExportResponse + 1, // 39: order.order.OrderInfo:output_type -> order.Response + 20, // 40: order.order.UpdateOrderDeliverStatus:output_type -> order.UpdateOrderDeliverStatusResponse + 22, // 41: order.order.GetOrderInfo:output_type -> order.OrderInfoResponse + 19, // 42: order.order.UpdateOrderDPayStatus:output_type -> order.UpdateOrderPayStatusResponse + 22, // [22:43] is the sub-list for method output_type + 1, // [1:22] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name } func init() { file_order_order_proto_init() } @@ -1750,7 +1989,7 @@ func file_order_order_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_order_order_proto_rawDesc), len(file_order_order_proto_rawDesc)), NumEnums: 0, - NumMessages: 21, + NumMessages: 24, NumExtensions: 0, NumServices: 1, }, diff --git a/rpc/order/pb/order_grpc.pb.go b/rpc/order/pb/order_grpc.pb.go index f598072..de0ed70 100644 --- a/rpc/order/pb/order_grpc.pb.go +++ b/rpc/order/pb/order_grpc.pb.go @@ -36,8 +36,10 @@ const ( Order_OrderAuditing_FullMethodName = "/order.order/OrderAuditing" Order_OrderCreate_FullMethodName = "/order.order/OrderCreate" Order_OrderDown_FullMethodName = "/order.order/OrderDown" + Order_OrderInfo_FullMethodName = "/order.order/OrderInfo" Order_UpdateOrderDeliverStatus_FullMethodName = "/order.order/UpdateOrderDeliverStatus" Order_GetOrderInfo_FullMethodName = "/order.order/GetOrderInfo" + Order_UpdateOrderDPayStatus_FullMethodName = "/order.order/UpdateOrderDPayStatus" ) // OrderClient is the client API for Order service. @@ -61,8 +63,10 @@ type OrderClient interface { OrderAuditing(ctx context.Context, in *OrderAuditingRequest, opts ...grpc.CallOption) (*Response, error) OrderCreate(ctx context.Context, in *AdminCreateOrderRequest, opts ...grpc.CallOption) (*Response, error) OrderDown(ctx context.Context, in *OrderItemsRequest, opts ...grpc.CallOption) (*ExcelExportResponse, error) + OrderInfo(ctx context.Context, in *IdRequest, opts ...grpc.CallOption) (*Response, error) UpdateOrderDeliverStatus(ctx context.Context, in *UpdateOrderDeliverStatusRequest, opts ...grpc.CallOption) (*UpdateOrderDeliverStatusResponse, error) GetOrderInfo(ctx context.Context, in *GetOrderInfoRequest, opts ...grpc.CallOption) (*OrderInfoResponse, error) + UpdateOrderDPayStatus(ctx context.Context, in *UpdateOrderPayStatusRequest, opts ...grpc.CallOption) (*UpdateOrderPayStatusResponse, error) } type orderClient struct { @@ -243,6 +247,16 @@ func (c *orderClient) OrderDown(ctx context.Context, in *OrderItemsRequest, opts return out, nil } +func (c *orderClient) OrderInfo(ctx context.Context, in *IdRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Order_OrderInfo_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *orderClient) UpdateOrderDeliverStatus(ctx context.Context, in *UpdateOrderDeliverStatusRequest, opts ...grpc.CallOption) (*UpdateOrderDeliverStatusResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdateOrderDeliverStatusResponse) @@ -263,6 +277,16 @@ func (c *orderClient) GetOrderInfo(ctx context.Context, in *GetOrderInfoRequest, return out, nil } +func (c *orderClient) UpdateOrderDPayStatus(ctx context.Context, in *UpdateOrderPayStatusRequest, opts ...grpc.CallOption) (*UpdateOrderPayStatusResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UpdateOrderPayStatusResponse) + err := c.cc.Invoke(ctx, Order_UpdateOrderDPayStatus_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // OrderServer is the server API for Order service. // All implementations must embed UnimplementedOrderServer // for forward compatibility. @@ -284,8 +308,10 @@ type OrderServer interface { OrderAuditing(context.Context, *OrderAuditingRequest) (*Response, error) OrderCreate(context.Context, *AdminCreateOrderRequest) (*Response, error) OrderDown(context.Context, *OrderItemsRequest) (*ExcelExportResponse, error) + OrderInfo(context.Context, *IdRequest) (*Response, error) UpdateOrderDeliverStatus(context.Context, *UpdateOrderDeliverStatusRequest) (*UpdateOrderDeliverStatusResponse, error) GetOrderInfo(context.Context, *GetOrderInfoRequest) (*OrderInfoResponse, error) + UpdateOrderDPayStatus(context.Context, *UpdateOrderPayStatusRequest) (*UpdateOrderPayStatusResponse, error) mustEmbedUnimplementedOrderServer() } @@ -347,12 +373,18 @@ func (UnimplementedOrderServer) OrderCreate(context.Context, *AdminCreateOrderRe func (UnimplementedOrderServer) OrderDown(context.Context, *OrderItemsRequest) (*ExcelExportResponse, error) { return nil, status.Error(codes.Unimplemented, "method OrderDown not implemented") } +func (UnimplementedOrderServer) OrderInfo(context.Context, *IdRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method OrderInfo not implemented") +} func (UnimplementedOrderServer) UpdateOrderDeliverStatus(context.Context, *UpdateOrderDeliverStatusRequest) (*UpdateOrderDeliverStatusResponse, error) { return nil, status.Error(codes.Unimplemented, "method UpdateOrderDeliverStatus not implemented") } func (UnimplementedOrderServer) GetOrderInfo(context.Context, *GetOrderInfoRequest) (*OrderInfoResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetOrderInfo not implemented") } +func (UnimplementedOrderServer) UpdateOrderDPayStatus(context.Context, *UpdateOrderPayStatusRequest) (*UpdateOrderPayStatusResponse, error) { + return nil, status.Error(codes.Unimplemented, "method UpdateOrderDPayStatus not implemented") +} func (UnimplementedOrderServer) mustEmbedUnimplementedOrderServer() {} func (UnimplementedOrderServer) testEmbeddedByValue() {} @@ -680,6 +712,24 @@ func _Order_OrderDown_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } +func _Order_OrderInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IdRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrderServer).OrderInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Order_OrderInfo_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrderServer).OrderInfo(ctx, req.(*IdRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Order_UpdateOrderDeliverStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateOrderDeliverStatusRequest) if err := dec(in); err != nil { @@ -716,6 +766,24 @@ func _Order_GetOrderInfo_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _Order_UpdateOrderDPayStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateOrderPayStatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OrderServer).UpdateOrderDPayStatus(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Order_UpdateOrderDPayStatus_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OrderServer).UpdateOrderDPayStatus(ctx, req.(*UpdateOrderPayStatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Order_ServiceDesc is the grpc.ServiceDesc for Order service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -791,6 +859,10 @@ var Order_ServiceDesc = grpc.ServiceDesc{ MethodName: "OrderDown", Handler: _Order_OrderDown_Handler, }, + { + MethodName: "OrderInfo", + Handler: _Order_OrderInfo_Handler, + }, { MethodName: "UpdateOrderDeliverStatus", Handler: _Order_UpdateOrderDeliverStatus_Handler, @@ -799,6 +871,10 @@ var Order_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetOrderInfo", Handler: _Order_GetOrderInfo_Handler, }, + { + MethodName: "UpdateOrderDPayStatus", + Handler: _Order_UpdateOrderDPayStatus_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "order/order.proto", diff --git a/rpc/store/pb/store.pb.go b/rpc/store/pb/store.pb.go new file mode 100644 index 0000000..c9eed69 --- /dev/null +++ b/rpc/store/pb/store.pb.go @@ -0,0 +1,295 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.11 +// protoc v4.25.8 +// source: store/store.proto + +package store + +import ( + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type EmptyRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *EmptyRequest) Reset() { + *x = EmptyRequest{} + mi := &file_store_store_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *EmptyRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*EmptyRequest) ProtoMessage() {} + +func (x *EmptyRequest) ProtoReflect() protoreflect.Message { + mi := &file_store_store_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use EmptyRequest.ProtoReflect.Descriptor instead. +func (*EmptyRequest) Descriptor() ([]byte, []int) { + return file_store_store_proto_rawDescGZIP(), []int{0} +} + +type IdRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IdRequest) Reset() { + *x = IdRequest{} + mi := &file_store_store_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IdRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IdRequest) ProtoMessage() {} + +func (x *IdRequest) ProtoReflect() protoreflect.Message { + mi := &file_store_store_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IdRequest.ProtoReflect.Descriptor instead. +func (*IdRequest) Descriptor() ([]byte, []int) { + return file_store_store_proto_rawDescGZIP(), []int{1} +} + +func (x *IdRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +type StatusRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Status int32 `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` + Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StatusRequest) Reset() { + *x = StatusRequest{} + mi := &file_store_store_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StatusRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatusRequest) ProtoMessage() {} + +func (x *StatusRequest) ProtoReflect() protoreflect.Message { + mi := &file_store_store_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead. +func (*StatusRequest) Descriptor() ([]byte, []int) { + return file_store_store_proto_rawDescGZIP(), []int{2} +} + +func (x *StatusRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *StatusRequest) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *StatusRequest) GetReason() string { + if x != nil { + return x.Reason + } + return "" +} + +type Response struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` + Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Response) Reset() { + *x = Response{} + mi := &file_store_store_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Response) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Response) ProtoMessage() {} + +func (x *Response) ProtoReflect() protoreflect.Message { + mi := &file_store_store_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Response.ProtoReflect.Descriptor instead. +func (*Response) Descriptor() ([]byte, []int) { + return file_store_store_proto_rawDescGZIP(), []int{3} +} + +func (x *Response) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *Response) GetMsg() string { + if x != nil { + return x.Msg + } + return "" +} + +func (x *Response) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +var File_store_store_proto protoreflect.FileDescriptor + +const file_store_store_proto_rawDesc = "" + + "\n" + + "\x11store/store.proto\x12\x05store\x1a\x1cgoogle/api/annotations.proto\"\x0e\n" + + "\fEmptyRequest\"\x1b\n" + + "\tIdRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\"O\n" + + "\rStatusRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x16\n" + + "\x06status\x18\x02 \x01(\x05R\x06status\x12\x16\n" + + "\x06reason\x18\x03 \x01(\tR\x06reason\"D\n" + + "\bResponse\x12\x12\n" + + "\x04code\x18\x01 \x01(\x05R\x04code\x12\x10\n" + + "\x03msg\x18\x02 \x01(\tR\x03msg\x12\x12\n" + + "\x04data\x18\x03 \x01(\tR\x04data2[\n" + + "\x05Store\x12R\n" + + "\x06Status\x12\x14.store.StatusRequest\x1a\x0f.store.Response\"!\x82\xd3\xe4\x93\x02\x1b:\x01*\"\x16/admin/v3/store/statusB\tZ\a./storeb\x06proto3" + +var ( + file_store_store_proto_rawDescOnce sync.Once + file_store_store_proto_rawDescData []byte +) + +func file_store_store_proto_rawDescGZIP() []byte { + file_store_store_proto_rawDescOnce.Do(func() { + file_store_store_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_store_store_proto_rawDesc), len(file_store_store_proto_rawDesc))) + }) + return file_store_store_proto_rawDescData +} + +var file_store_store_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_store_store_proto_goTypes = []any{ + (*EmptyRequest)(nil), // 0: store.EmptyRequest + (*IdRequest)(nil), // 1: store.IdRequest + (*StatusRequest)(nil), // 2: store.StatusRequest + (*Response)(nil), // 3: store.Response +} +var file_store_store_proto_depIdxs = []int32{ + 2, // 0: store.Store.Status:input_type -> store.StatusRequest + 3, // 1: store.Store.Status:output_type -> store.Response + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_store_store_proto_init() } +func file_store_store_proto_init() { + if File_store_store_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_store_store_proto_rawDesc), len(file_store_store_proto_rawDesc)), + NumEnums: 0, + NumMessages: 4, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_store_store_proto_goTypes, + DependencyIndexes: file_store_store_proto_depIdxs, + MessageInfos: file_store_store_proto_msgTypes, + }.Build() + File_store_store_proto = out.File + file_store_store_proto_goTypes = nil + file_store_store_proto_depIdxs = nil +} diff --git a/rpc/store/pb/store_grpc.pb.go b/rpc/store/pb/store_grpc.pb.go new file mode 100644 index 0000000..7bf7cbc --- /dev/null +++ b/rpc/store/pb/store_grpc.pb.go @@ -0,0 +1,121 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.6.2 +// - protoc v4.25.8 +// source: store/store.proto + +package store + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Store_Status_FullMethodName = "/store.Store/Status" +) + +// StoreClient is the client API for Store service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type StoreClient interface { + Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*Response, error) +} + +type storeClient struct { + cc grpc.ClientConnInterface +} + +func NewStoreClient(cc grpc.ClientConnInterface) StoreClient { + return &storeClient{cc} +} + +func (c *storeClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*Response, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(Response) + err := c.cc.Invoke(ctx, Store_Status_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// StoreServer is the server API for Store service. +// All implementations must embed UnimplementedStoreServer +// for forward compatibility. +type StoreServer interface { + Status(context.Context, *StatusRequest) (*Response, error) + mustEmbedUnimplementedStoreServer() +} + +// UnimplementedStoreServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedStoreServer struct{} + +func (UnimplementedStoreServer) Status(context.Context, *StatusRequest) (*Response, error) { + return nil, status.Error(codes.Unimplemented, "method Status not implemented") +} +func (UnimplementedStoreServer) mustEmbedUnimplementedStoreServer() {} +func (UnimplementedStoreServer) testEmbeddedByValue() {} + +// UnsafeStoreServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to StoreServer will +// result in compilation errors. +type UnsafeStoreServer interface { + mustEmbedUnimplementedStoreServer() +} + +func RegisterStoreServer(s grpc.ServiceRegistrar, srv StoreServer) { + // If the following call panics, it indicates UnimplementedStoreServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Store_ServiceDesc, srv) +} + +func _Store_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StatusRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StoreServer).Status(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Store_Status_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StoreServer).Status(ctx, req.(*StatusRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Store_ServiceDesc is the grpc.ServiceDesc for Store service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Store_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "store.Store", + HandlerType: (*StoreServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Status", + Handler: _Store_Status_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "store/store.proto", +} diff --git a/rpc/store/store.pb b/rpc/store/store.pb new file mode 100644 index 0000000000000000000000000000000000000000..6766d65e2355804cf4d975efea09aa7b849c20e7 GIT binary patch literal 13649 zcmd5@U5p#obvDW6E_u1jot<4t^xBSOI<{rm<|dS5%W{yET+Xg2b4m7+D@#s`=`1NLlNLAWie&A}x@hMc@=j3*^OZ(E>$*7AVk{z6M3nq9{=GwMFfs0s7L1yrti{ z_s$=OlGXuSSPv`Cx#ygF?wNDX-@U{BB+1U5j7BGYd&e60cJ5B6&Jri~ zRPapSc#P8n!N#*`ERCU}l4EPyxtm*7 z1M*RSjV*U(&U7@$r7(~wJ{45Pt{5S?o7Qw{PllLXp+l&pqfz%Xw?h25_^m&~)}Wv9 zXz19c7+e*Dt1hq%0%&y8>UMimsLtw}N4;UUH#~82nTNa!-6tq3{BoMDU_m5Q{tdPf zk(A_n7r08n;y1xSb60AYi{IrFmhFrNfmN5&V!>oR&Dh%|Wg91>zBN24j3y^LC-zX- z){Y#4WjVs?tl@ApwP;<=8-d?Hi7)M!n$@FaL3EXU@Eh!sq}&mZquKFJ*LFIS-WUd< z%ywN(>tf`;!8Z1KeY@fzwqO|7*wQh8%8tM2F2W@$gejV|BrYhftfs#Gv!DJVru`=U z&3~9=n+tGBUqfp^{KY$_-!L)gz4NYhVk)K;`*tLh9Q&?*Pb`gN+FS3pC z?5N-CU@v)S3}{KN$$^Ro*PmzW@7dP7K~%DkB+n8!fVj(62e#ut9&>s+wy_~-PhX1Y z!q=SCLq<`xL8O;h+8)jZl0#B(h-%XS#ypo4ktr4{R{ve&cw-FX&1o&G9Y8I6SzsvZ600v3I{A#u2itXG-ljAoOLZ3;iv z8y=5xY2gwsMi{gN;x7DQ6=*yw3EgM-nq}v7IJNHQBBxz#Q-%Qsl^m^1^UB;}t`Z;~dgc=`6u$RMEj63Yy2XNu4u?2zpLEOy8w zQPd2jA%9vkyv^1<8!{(wSriILlAVaI=hRv-T-)PB##m>`+b%Ts|Nu%=}fK3R5-^Zmk+we5^#XRGbTCx)PKcaFa_{T z@wte&Vb1gG-hPd(g%)tusq=ro#Lg|`t>0!_vte(D=sBJsTj-k7W#m4VUMFgFhe2#9 zA>RzKkU;$o%aDCo6A=j2ZY-W{$px|yMOjXK5R3C5FQh7|W80d}@M3aBp~@#BeD@>* zf+P2k^#NPGXHR;^y^a)$-b1!{Eke9dSA|;v(iY;oeVrZFZyCJ0S2Ze9%nk!r0t(ADGU2W90$Mh@zI9~xMdF$*z8HB4i)JX)h=fZ@{cB1!l;UQKSI)+P{3{nK zCB2h6rQSt4%u@sqdWVi}@`GL5&2PMCN^iUNu{G;Y&3jgVW~ule3$E*}phbqI6wPJ;3!fpJxBWvidt0Phsf zO0Xob`uV?(vn5gnz54c@reRhZhvk}~#pu-wz+SCUYHM-txms_(`ihqD2o5D+DTr{j zs3qb2RwaY#ZKDE`-$>T~Ko!b!f)lG2uC-tg))4NEf4JJ-I1FoN0X5QF+8VluBd|Po0K)0zA0%UlKys_omTIJ<;$2n@Z&R!1mL2fg

3WiNipO2G&-XmnsIzOPxh?n zvP^8`vPktV1hJ{vq6YK=thi&^L+c1H-kRWtle;L8m!^{$s=H3d5Q8N#hMwrg=;)n} zG%OQrj(hiWUj#v#uhW1qtEK?!FMzjm*P4t)4&%UR?cB2xRl+Hi5nwWG=e^$X)aCfR zK+6c2;&z#7ufb>_j;O1%SS?jJZra6G0ax=Z3DR+ zQnOmMZJ7M9-mV@PS|X6xqdvHzy@PayLiSYvF8=|uLeQ6vFi(6fGvJ?C#9vu~eRol{dJ>Y}fN zuGsJxy~`;O`$VejP@Wxyl=Jy^YqP@S#R)zQjIHe{c*O`x86Su$7}(DQ(T`7 zWh($Z4}rBFG?uJCS_6x-+7)J`rgS*63Xp!8p*lR8o#5Q4YjvjKc!KT*hPW8f-(+cO z#SBT&qIAm^Uw*iHw7*+gSWQT3K3}D>md)5Tq#1na*$@Rd{TXF<$ z#x)o0o52Xjt*Tx0-~)rKlAlZb{0>VB_oFkW91xmYDYmrR;1z^N#6#(p%x2ZtMTE?M zg)K{;LZQ?1Dj<@NszD(FD~%o=lno9tSmWG2)X%XEZnO;q+D6?xtiM@ryhWY05ZH~w zF}zpJ$8I$axsc{};!K<0l==m>*)H*Yqiu?YhR+&2f&+V1(a*Wao(MvX+mNY6GVxL! zos{@IKexq_AW?&qXmr*p+R{9@Q8yZUX#32~F4`{3Xh@z9@*t=Qo$xzo0?jR?W$;^7 zEIWnZpa+Q#jP{L2MN2P=Sh}{E|FakpAUbf6stP+5viQ$cu+9HdoMi&N5NZ`#{r>1Z z)9Uw-p38X11gJ!iv&NsZr!Jx@6{Xv!O2W|3}W7 z|51Xig?c}8`|N?zeUokUy7pi^LYju+pl{#9IR>dAyWn&+G((~4)76OV`ewCa95fqn z$-8&lAi=c&dw~|plAifA3jfSBnQt;}el_IK7pwA6<2b} zF&uOXm}E#z6WKPCQj+goG=k%P&V%QmR*!ERd{O z+I+DdyMQ_K>F%d0_kE!&IW0OrA2H3n*htU#}VU{q_yB$qjLs2VvAZSyz*} zg!*@I2rs)gqTwXY#Ipo*!r9) z=ufhos!&izM5GcL3K<8)L+MsAYSjaDKI!oF24ns^rkHiJg=z@z@}SfX$b~Mdc&A{1 zdL;Vd5wVu(R>b$}`2Tx#?fdlq_v_jZ>Nl5DAFpVitmOYE!F1oUyq?Exmg>4q6nXdf zs}I=>E?L3n6z(H%j~i9YIH>9kaEDP9!jG<)6@lU@SXlQ%EaZlLNYOoz1d7G>&v7LB zAYp&0rbnG^q57Xp;E*U{9!pQElmv0wmDLCEh`V-Iv$~3>A5GrcirJcKa{EuEvm@Hj*<$oo!^4Cxv=lXc7$EuNFSC>j^}OX{`U*?5j5a)#a9Y(; z3(o1II9qWyHQb_6sm^txHqnq&KQe3Kcm2_+Q%!nJ+tbP7r#`z z3V$~TdPVy$(c^KkzHH*APTOqMYj+?i{H{At3=G6^LVLj-cpd*<3k?4FcbDgfuLXwx zFgpBtVEB(PyouI}TJu5aw)PABTPc4Fhra&ZfA>~RS@VyWnsjI0xe+?+F8&Uk zS~!6_{NtmaBcF{Y_M7EDjc@OZ?@|ha6YlyKxP46Dejp=be;j8|s!svvvlZXu9rYPN z;Omv`#UHqAKk{3G>u<89yY$)1BW^(C{^F;9D{K12AH)bIlUExhbl3jg}n~O(^HO%47i}3M;TP@st4RAi}z%AJi+lR-(YKW z$#dpB00GWp8ON4D5dHzTc;pkoaa#nrpK`G3DUT?Ci%Q~~7`o_!>OhuBNiKeq_ZT=Q z%GuCQ!lILF#Yg-uegh}Fv{ap=oh_!E71v`|%IUXP3KHmkr1F0Ra<=LK literal 0 HcmV?d00001 diff --git a/rpc/store/store.proto b/rpc/store/store.proto new file mode 100644 index 0000000..f02d5b5 --- /dev/null +++ b/rpc/store/store.proto @@ -0,0 +1,33 @@ +syntax = "proto3"; + +package store; +option go_package="./store"; +import "google/api/annotations.proto"; + +message EmptyRequest { +} + +message IdRequest { + int64 id = 1; +} + +message StatusRequest { + int64 id = 1; + int32 status = 2; + string reason = 3; +} + +message Response { + int32 code = 1; + string msg = 2; + string data = 3; +} + +service Store { + rpc Status(StatusRequest) returns(Response){ + option (google.api.http) = { + post: "/admin/v3/store/status" + body: "*" + }; + }; +} diff --git a/services/order/internal/dao/cart.go b/services/order/internal/dao/cart.go index 12bd3cd..47102fe 100644 --- a/services/order/internal/dao/cart.go +++ b/services/order/internal/dao/cart.go @@ -1,7 +1,7 @@ package dao -const CartTypeStore = 1 -const CartTypeSale = 2 +const CartTypeStore = 2 +const CartTypeSale = 1 const CartTypeUser = 3 type Cart struct { diff --git a/services/order/internal/logic/getOrderInfoLogic.go b/services/order/internal/logic/getOrderInfoLogic.go index 28e8cd4..13e57c2 100644 --- a/services/order/internal/logic/getOrderInfoLogic.go +++ b/services/order/internal/logic/getOrderInfoLogic.go @@ -2,17 +2,24 @@ package logic import ( "context" - + "lone-services/pkg/modelbase" + "lone-services/pkg/utils" "lone-services/rpc/order/pb" + "lone-services/services/order/internal/dao" + "lone-services/services/order/internal/model" "lone-services/services/order/internal/svc" + "strconv" "github.com/zeromicro/go-zero/core/logx" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" ) type GetOrderInfoLogic struct { ctx context.Context svcCtx *svc.ServiceContext logx.Logger + BaseLogic } func NewGetOrderInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetOrderInfoLogic { @@ -24,7 +31,84 @@ func NewGetOrderInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetO } func (l *GetOrderInfoLogic) GetOrderInfo(in *order.GetOrderInfoRequest) (*order.OrderInfoResponse, error) { - // todo: add your logic here and delete this line + var info dao.OrderInfo + modelObj := model.OrderModel{}.Init() + w := modelbase.Params{Eq: map[string]string{"order_sn": in.OrderSn}} - return &order.OrderInfoResponse{}, nil + switch in.Type { + case dao.OrderTypeSale: + w.Eq["sale_id"] = strconv.FormatInt(in.UserId, utils.NumberTen) + case dao.OrderTypePersonal: + w.Eq["user_id"] = strconv.FormatInt(in.UserId, utils.NumberTen) + case dao.OrderTypeStore: + w.Eq["store_id"] = strconv.FormatInt(in.UserId, utils.NumberTen) + default: + return nil, status.Error(codes.Internal, utils.ErrorParams.Msg) + } + + err := modelObj.GetOne(w, &info) + if err != nil { + l.Logger.Error(err) + return nil, status.Error(codes.Internal, utils.ErrorNotFund.Msg) + } + + if info.Id < utils.NumberOne { + return nil, status.Error(codes.Internal, utils.ErrorNotFund.Msg) + } + + var productItems []dao.OrderProducts + ww := modelbase.Params{ + Eq: map[string]string{"order_sn": in.OrderSn}, + } + err = model.OrderProductModel{}.Init().Items(ww, &productItems) + if err != nil { + l.Logger.Error("product err:", err) + return nil, status.Error(codes.Internal, utils.ErrorNotFund.Msg) + } + + info.ProductItems = productItems + mobile, _ := utils.DecryptPhone(info.Mobile) + info.AesMobile = info.Mobile + info.Mobile = mobile + + res := order.OrderInfoResponse{ + Id: info.Id, + OrderSn: info.OrderSn, + StoreId: int64(info.StoreId), + StoreName: info.SaleName, + SaleName: info.SaleName, + SaleMobile: info.SaleMobile, + UserId: int64(info.UserId), + UserName: info.UserName, + SaleId: int64(info.SaleId), + Mobile: info.Mobile, + Address: info.Address, + Addressee: info.Addressee, + DistrictIds: info.DistrictIds, + TotalPrice: utils.RoundFloat(info.TotalPrice), + PayPrice: utils.RoundFloat(info.PayPrice), + PayType: int32(info.PayType), + DeliverStatus: int32(info.DeliverStatus), + Status: int32(info.Status), + IsSupply: int32(info.IsSupply), + Note: info.Note, + ProductIds: info.ProductIds, + OutTradeNo: info.OutTradeNo, + Type: int32(info.Type), + VerifyStatus: int32(info.VerifyStatus), + CreateType: int32(info.CreateType), + RefundStatus: int32(info.RefundStatus), + } + for _, v := range productItems { + res.ProductItems = append(res.ProductItems, &order.ProductItemsResponse{ + Id: int64(v.Id), + ProductId: int64(v.ProductId), + ProductName: v.ProductName, + Price: utils.RoundFloat(float64(v.Price)), + Number: int32(v.Number), + OrderSn: v.OrderSn, + }) + } + + return &res, nil } diff --git a/services/order/internal/logic/itemsLogic.go b/services/order/internal/logic/itemsLogic.go index 2394fd5..b46a5e9 100644 --- a/services/order/internal/logic/itemsLogic.go +++ b/services/order/internal/logic/itemsLogic.go @@ -92,15 +92,13 @@ func (l *ItemsLogic) Items(in *order.OrderItemsRequest) (*order.Response, error) l.Logger.Error("order_sn:", v.OrderSn) ids = append(ids, v.OrderSn) } - l.Logger.Error("ids:", ids) - l.Logger.Error(len(ids), utils.NumberOne) var productItems []dao.OrderProducts ww := modelbase.Params{ In: map[string][]string{"order_sn": ids}, } err = model.OrderProductModel{}.Init().Items(ww, &productItems) if err != nil { - utils.Logger.Error("product err:", err) + l.Logger.Error("product err:", err) return l.fail(utils.ErrorNotFund) } diff --git a/services/order/internal/logic/orderInfoLogic.go b/services/order/internal/logic/orderInfoLogic.go new file mode 100644 index 0000000..73a7e87 --- /dev/null +++ b/services/order/internal/logic/orderInfoLogic.go @@ -0,0 +1,70 @@ +package logic + +import ( + "context" + "lone-services/pkg/modelbase" + "lone-services/pkg/utils" + "lone-services/pkg/validate" + "lone-services/services/order/internal/dao" + "lone-services/services/order/internal/model" + "strconv" + "strings" + + "lone-services/rpc/order/pb" + "lone-services/services/order/internal/svc" + + "github.com/zeromicro/go-zero/core/logx" +) + +type OrderInfoLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger + BaseLogic +} + +func NewOrderInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *OrderInfoLogic { + return &OrderInfoLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *OrderInfoLogic) OrderInfo(in *order.IdRequest) (*order.Response, error) { + var v validate.InfoValidator + if fail := l.checkParams(in, &v); fail != nil { + return fail, nil + } + + var info dao.OrderInfo + modelObj := model.OrderModel{}.Init() + w := modelbase.Params{Eq: map[string]string{"id": strconv.Itoa(int(in.Id))}} + err := modelObj.GetOne(w, &info) + if err != nil { + l.Logger.Error(err) + return l.fail(utils.ErrorNotFund) + } + + if info.Id < utils.NumberOne { + return l.fail(utils.ErrorNotFund) + } + + var productItems []dao.OrderProducts + ww := modelbase.Params{ + In: map[string][]string{"order_sn": strings.Split(info.ProductIds, utils.DecollatorComma)}, + } + err = model.OrderProductModel{}.Init().Items(ww, &productItems) + if err != nil { + l.Logger.Error("product err:", err) + return l.fail(utils.ErrorNotFund) + } + + info.ProductItems = productItems + mobile, _ := utils.DecryptPhone(info.Mobile) + info.AesMobile = info.Mobile + info.Mobile = utils.DecryptPhoneReplace(mobile) + + return l.ok(info) + +} diff --git a/services/order/internal/logic/updateOrderDPayStatusLogic.go b/services/order/internal/logic/updateOrderDPayStatusLogic.go new file mode 100644 index 0000000..cd371a7 --- /dev/null +++ b/services/order/internal/logic/updateOrderDPayStatusLogic.go @@ -0,0 +1,31 @@ +package logic + +import ( + "context" + + "lone-services/rpc/order/pb" + "lone-services/services/order/internal/svc" + + "github.com/zeromicro/go-zero/core/logx" +) + +type UpdateOrderDPayStatusLogic struct { + ctx context.Context + svcCtx *svc.ServiceContext + logx.Logger + BaseLogic +} + +func NewUpdateOrderDPayStatusLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdateOrderDPayStatusLogic { + return &UpdateOrderDPayStatusLogic{ + ctx: ctx, + svcCtx: svcCtx, + Logger: logx.WithContext(ctx), + } +} + +func (l *UpdateOrderDPayStatusLogic) UpdateOrderDPayStatus(in *order.UpdateOrderPayStatusRequest) (*order.UpdateOrderPayStatusResponse, error) { + // todo: add your logic here and delete this line + + return &order.UpdateOrderPayStatusResponse{}, nil +} diff --git a/services/order/internal/server/orderServer.go b/services/order/internal/server/orderServer.go index a8f3d74..695e73a 100644 --- a/services/order/internal/server/orderServer.go +++ b/services/order/internal/server/orderServer.go @@ -108,6 +108,11 @@ func (s *OrderServer) OrderDown(ctx context.Context, in *order.OrderItemsRequest return l.OrderDown(in) } +func (s *OrderServer) OrderInfo(ctx context.Context, in *order.IdRequest) (*order.Response, error) { + l := logic.NewOrderInfoLogic(ctx, s.svcCtx) + return l.OrderInfo(in) +} + func (s *OrderServer) UpdateOrderDeliverStatus(ctx context.Context, in *order.UpdateOrderDeliverStatusRequest) (*order.UpdateOrderDeliverStatusResponse, error) { l := logic.NewUpdateOrderDeliverStatusLogic(ctx, s.svcCtx) return l.UpdateOrderDeliverStatus(in) @@ -117,3 +122,8 @@ func (s *OrderServer) GetOrderInfo(ctx context.Context, in *order.GetOrderInfoRe l := logic.NewGetOrderInfoLogic(ctx, s.svcCtx) return l.GetOrderInfo(in) } + +func (s *OrderServer) UpdateOrderDPayStatus(ctx context.Context, in *order.UpdateOrderPayStatusRequest) (*order.UpdateOrderPayStatusResponse, error) { + l := logic.NewUpdateOrderDPayStatusLogic(ctx, s.svcCtx) + return l.UpdateOrderDPayStatus(in) +} diff --git a/services/order/orderClient/order.go b/services/order/orderClient/order.go index 1d563bf..26078d1 100644 --- a/services/order/orderClient/order.go +++ b/services/order/orderClient/order.go @@ -31,10 +31,13 @@ type ( OrderAuditingRequest = order.OrderAuditingRequest OrderInfoResponse = order.OrderInfoResponse OrderItemsRequest = order.OrderItemsRequest + ProductItemsResponse = order.ProductItemsResponse Response = order.Response TypeRequest = order.TypeRequest UpdateOrderDeliverStatusRequest = order.UpdateOrderDeliverStatusRequest UpdateOrderDeliverStatusResponse = order.UpdateOrderDeliverStatusResponse + UpdateOrderPayStatusRequest = order.UpdateOrderPayStatusRequest + UpdateOrderPayStatusResponse = order.UpdateOrderPayStatusResponse Order interface { Items(ctx context.Context, in *OrderItemsRequest, opts ...grpc.CallOption) (*Response, error) @@ -54,8 +57,10 @@ type ( OrderAuditing(ctx context.Context, in *OrderAuditingRequest, opts ...grpc.CallOption) (*Response, error) OrderCreate(ctx context.Context, in *AdminCreateOrderRequest, opts ...grpc.CallOption) (*Response, error) OrderDown(ctx context.Context, in *OrderItemsRequest, opts ...grpc.CallOption) (*ExcelExportResponse, error) + OrderInfo(ctx context.Context, in *IdRequest, opts ...grpc.CallOption) (*Response, error) UpdateOrderDeliverStatus(ctx context.Context, in *UpdateOrderDeliverStatusRequest, opts ...grpc.CallOption) (*UpdateOrderDeliverStatusResponse, error) GetOrderInfo(ctx context.Context, in *GetOrderInfoRequest, opts ...grpc.CallOption) (*OrderInfoResponse, error) + UpdateOrderDPayStatus(ctx context.Context, in *UpdateOrderPayStatusRequest, opts ...grpc.CallOption) (*UpdateOrderPayStatusResponse, error) } defaultOrder struct { @@ -154,6 +159,11 @@ func (m *defaultOrder) OrderDown(ctx context.Context, in *OrderItemsRequest, opt return client.OrderDown(ctx, in, opts...) } +func (m *defaultOrder) OrderInfo(ctx context.Context, in *IdRequest, opts ...grpc.CallOption) (*Response, error) { + client := order.NewOrderClient(m.cli.Conn()) + return client.OrderInfo(ctx, in, opts...) +} + func (m *defaultOrder) UpdateOrderDeliverStatus(ctx context.Context, in *UpdateOrderDeliverStatusRequest, opts ...grpc.CallOption) (*UpdateOrderDeliverStatusResponse, error) { client := order.NewOrderClient(m.cli.Conn()) return client.UpdateOrderDeliverStatus(ctx, in, opts...) @@ -163,3 +173,8 @@ func (m *defaultOrder) GetOrderInfo(ctx context.Context, in *GetOrderInfoRequest client := order.NewOrderClient(m.cli.Conn()) return client.GetOrderInfo(ctx, in, opts...) } + +func (m *defaultOrder) UpdateOrderDPayStatus(ctx context.Context, in *UpdateOrderPayStatusRequest, opts ...grpc.CallOption) (*UpdateOrderPayStatusResponse, error) { + client := order.NewOrderClient(m.cli.Conn()) + return client.UpdateOrderDPayStatus(ctx, in, opts...) +}