Compare commits
No commits in common. "308b4f044dafe0e7956f104c221b31b4f7a226c4" and "cdc99eb4de3afcf3dfe6efb3a2a60f6e6d79abc1" have entirely different histories.
308b4f044d
...
cdc99eb4de
@ -7,7 +7,6 @@ RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shangh
|
||||
|
||||
WORKDIR /app
|
||||
#通过名称引用
|
||||
COPY ./data /app/data
|
||||
COPY ./build/app /app/app
|
||||
COPY ./conf/ /conf/
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.26.0
|
||||
// protoc v3.10.1
|
||||
// protoc-gen-go v1.32.0
|
||||
// protoc v5.29.0--rc3
|
||||
// source: pb/bundle.proto
|
||||
|
||||
package bundle
|
||||
@ -25,9 +25,7 @@ type CommonResponse struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
|
||||
Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"`
|
||||
OrderNo string `protobuf:"bytes,3,opt,name=orderNo,proto3" json:"orderNo,omitempty"`
|
||||
Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
|
||||
}
|
||||
|
||||
func (x *CommonResponse) Reset() {
|
||||
@ -69,36 +67,20 @@ func (x *CommonResponse) GetMsg() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CommonResponse) GetUuid() string {
|
||||
if x != nil {
|
||||
return x.Uuid
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *CommonResponse) GetOrderNo() string {
|
||||
if x != nil {
|
||||
return x.OrderNo
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type BundleProfile struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Price float32 `protobuf:"fixed32,3,opt,name=price,proto3" json:"price,omitempty"`
|
||||
PriceType int64 `protobuf:"varint,4,opt,name=PriceType,json=priceType,proto3" json:"PriceType,omitempty"`
|
||||
Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"`
|
||||
Contract string `protobuf:"bytes,6,opt,name=contract,proto3" json:"contract,omitempty"`
|
||||
Language string `protobuf:"bytes,7,opt,name=language,proto3" json:"language,omitempty"`
|
||||
CreatedAt string `protobuf:"bytes,8,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
|
||||
UpdatedAt string `protobuf:"bytes,9,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
|
||||
CompanySign string `protobuf:"bytes,10,opt,name=companySign,proto3" json:"companySign,omitempty"`
|
||||
ContractDuration int64 `protobuf:"varint,11,opt,name=contractDuration,proto3" json:"contractDuration,omitempty"`
|
||||
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
|
||||
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Price int64 `protobuf:"varint,3,opt,name=price,proto3" json:"price,omitempty"`
|
||||
PriceType int64 `protobuf:"varint,4,opt,name=PriceType,json=priceType,proto3" json:"PriceType,omitempty"`
|
||||
Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"`
|
||||
Contract string `protobuf:"bytes,6,opt,name=contract,proto3" json:"contract,omitempty"`
|
||||
Language string `protobuf:"bytes,7,opt,name=language,proto3" json:"language,omitempty"`
|
||||
CreatedAt string `protobuf:"bytes,8,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
|
||||
UpdatedAt string `protobuf:"bytes,9,opt,name=updatedAt,proto3" json:"updatedAt,omitempty"`
|
||||
}
|
||||
|
||||
func (x *BundleProfile) Reset() {
|
||||
@ -147,7 +129,7 @@ func (x *BundleProfile) GetName() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *BundleProfile) GetPrice() float32 {
|
||||
func (x *BundleProfile) GetPrice() int64 {
|
||||
if x != nil {
|
||||
return x.Price
|
||||
}
|
||||
@ -196,20 +178,6 @@ func (x *BundleProfile) GetUpdatedAt() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *BundleProfile) GetCompanySign() string {
|
||||
if x != nil {
|
||||
return x.CompanySign
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *BundleProfile) GetContractDuration() int64 {
|
||||
if x != nil {
|
||||
return x.ContractDuration
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
type DelBundleRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -266,7 +234,6 @@ type BundleListRequest struct {
|
||||
PageSize int32 `protobuf:"varint,2,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
|
||||
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Content string `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"`
|
||||
Language string `protobuf:"bytes,5,opt,name=language,proto3" json:"language,omitempty"`
|
||||
}
|
||||
|
||||
func (x *BundleListRequest) Reset() {
|
||||
@ -329,13 +296,6 @@ func (x *BundleListRequest) GetContent() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *BundleListRequest) GetLanguage() string {
|
||||
if x != nil {
|
||||
return x.Language
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type BundleListResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -498,24 +458,23 @@ type OrderRecord struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
|
||||
BundleUuid string `protobuf:"bytes,2,opt,name=bundleUuid,proto3" json:"bundleUuid,omitempty"`
|
||||
CustomerID string `protobuf:"bytes,3,opt,name=customerID,proto3" json:"customerID,omitempty"`
|
||||
CustomerNum string `protobuf:"bytes,4,opt,name=customerNum,proto3" json:"customerNum,omitempty"`
|
||||
CustomerName string `protobuf:"bytes,5,opt,name=customerName,proto3" json:"customerName,omitempty"`
|
||||
Amount float32 `protobuf:"fixed32,6,opt,name=amount,proto3" json:"amount,omitempty"`
|
||||
AmountType int64 `protobuf:"varint,7,opt,name=amountType,proto3" json:"amountType,omitempty"`
|
||||
SignContract string `protobuf:"bytes,8,opt,name=signContract,proto3" json:"signContract,omitempty"`
|
||||
Signature string `protobuf:"bytes,9,opt,name=signature,proto3" json:"signature,omitempty"`
|
||||
SignedTime string `protobuf:"bytes,10,opt,name=signedTime,proto3" json:"signedTime,omitempty"`
|
||||
PayType int64 `protobuf:"varint,11,opt,name=payType,proto3" json:"payType,omitempty"`
|
||||
PayTime string `protobuf:"bytes,12,opt,name=payTime,proto3" json:"payTime,omitempty"`
|
||||
CheckoutSessionId string `protobuf:"bytes,13,opt,name=checkoutSessionId,proto3" json:"checkoutSessionId,omitempty"`
|
||||
CheckoutSessionUrl string `protobuf:"bytes,14,opt,name=checkoutSessionUrl,proto3" json:"checkoutSessionUrl,omitempty"`
|
||||
Status int64 `protobuf:"varint,15,opt,name=status,proto3" json:"status,omitempty"`
|
||||
OrderNo string `protobuf:"bytes,16,opt,name=orderNo,proto3" json:"orderNo,omitempty"`
|
||||
BundleName string `protobuf:"bytes,17,opt,name=bundleName,proto3" json:"bundleName,omitempty"`
|
||||
ContractNo string `protobuf:"bytes,18,opt,name=contractNo,proto3" json:"contractNo,omitempty"`
|
||||
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
|
||||
BundleUuid string `protobuf:"bytes,2,opt,name=bundleUuid,proto3" json:"bundleUuid,omitempty"`
|
||||
CustomerID string `protobuf:"bytes,3,opt,name=customerID,proto3" json:"customerID,omitempty"`
|
||||
CustomerNum string `protobuf:"bytes,4,opt,name=customerNum,proto3" json:"customerNum,omitempty"`
|
||||
CustomerName string `protobuf:"bytes,5,opt,name=customerName,proto3" json:"customerName,omitempty"`
|
||||
Amount int64 `protobuf:"varint,6,opt,name=amount,proto3" json:"amount,omitempty"`
|
||||
AmountType int64 `protobuf:"varint,7,opt,name=amountType,proto3" json:"amountType,omitempty"`
|
||||
SignContract string `protobuf:"bytes,8,opt,name=signContract,proto3" json:"signContract,omitempty"`
|
||||
Signature string `protobuf:"bytes,9,opt,name=signature,proto3" json:"signature,omitempty"`
|
||||
SignedTime string `protobuf:"bytes,10,opt,name=signedTime,proto3" json:"signedTime,omitempty"`
|
||||
PayType int64 `protobuf:"varint,11,opt,name=payType,proto3" json:"payType,omitempty"`
|
||||
PayTime string `protobuf:"bytes,12,opt,name=payTime,proto3" json:"payTime,omitempty"`
|
||||
CheckoutSessionId string `protobuf:"bytes,13,opt,name=checkoutSessionId,proto3" json:"checkoutSessionId,omitempty"`
|
||||
CheckoutSessionUrl string `protobuf:"bytes,14,opt,name=checkoutSessionUrl,proto3" json:"checkoutSessionUrl,omitempty"`
|
||||
Status string `protobuf:"bytes,15,opt,name=status,proto3" json:"status,omitempty"`
|
||||
OrderNo string `protobuf:"bytes,16,opt,name=orderNo,proto3" json:"orderNo,omitempty"`
|
||||
BundleName string `protobuf:"bytes,17,opt,name=bundleName,proto3" json:"bundleName,omitempty"`
|
||||
}
|
||||
|
||||
func (x *OrderRecord) Reset() {
|
||||
@ -585,7 +544,7 @@ func (x *OrderRecord) GetCustomerName() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrderRecord) GetAmount() float32 {
|
||||
func (x *OrderRecord) GetAmount() int64 {
|
||||
if x != nil {
|
||||
return x.Amount
|
||||
}
|
||||
@ -648,11 +607,11 @@ func (x *OrderRecord) GetCheckoutSessionUrl() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrderRecord) GetStatus() int64 {
|
||||
func (x *OrderRecord) GetStatus() string {
|
||||
if x != nil {
|
||||
return x.Status
|
||||
}
|
||||
return 0
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrderRecord) GetOrderNo() string {
|
||||
@ -669,13 +628,6 @@ func (x *OrderRecord) GetBundleName() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrderRecord) GetContractNo() string {
|
||||
if x != nil {
|
||||
return x.ContractNo
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type OrderRecordsRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -693,7 +645,6 @@ type OrderRecordsRequest struct {
|
||||
EndSignedTime string `protobuf:"bytes,10,opt,name=endSignedTime,proto3" json:"endSignedTime,omitempty"`
|
||||
StartPayTime string `protobuf:"bytes,11,opt,name=startPayTime,proto3" json:"startPayTime,omitempty"`
|
||||
EndPayTime string `protobuf:"bytes,12,opt,name=endPayTime,proto3" json:"endPayTime,omitempty"`
|
||||
CustomerID string `protobuf:"bytes,13,opt,name=customerID,proto3" json:"customerID,omitempty"`
|
||||
}
|
||||
|
||||
func (x *OrderRecordsRequest) Reset() {
|
||||
@ -812,13 +763,6 @@ func (x *OrderRecordsRequest) GetEndPayTime() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrderRecordsRequest) GetCustomerID() string {
|
||||
if x != nil {
|
||||
return x.CustomerID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type OrderRecordsResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -879,9 +823,7 @@ type OrderRecordsDetailRequest struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
|
||||
OrderNo string `protobuf:"bytes,2,opt,name=orderNo,proto3" json:"orderNo,omitempty"`
|
||||
CustomerID string `protobuf:"bytes,3,opt,name=customerID,proto3" json:"customerID,omitempty"`
|
||||
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
|
||||
}
|
||||
|
||||
func (x *OrderRecordsDetailRequest) Reset() {
|
||||
@ -923,20 +865,6 @@ func (x *OrderRecordsDetailRequest) GetUuid() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrderRecordsDetailRequest) GetOrderNo() string {
|
||||
if x != nil {
|
||||
return x.OrderNo
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (x *OrderRecordsDetailRequest) GetCustomerID() string {
|
||||
if x != nil {
|
||||
return x.CustomerID
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type OrderRecordsDetailResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
@ -996,190 +924,168 @@ var File_pb_bundle_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_pb_bundle_proto_rawDesc = []byte{
|
||||
0x0a, 0x0f, 0x70, 0x62, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x12, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x50, 0x0a, 0x0e, 0x43, 0x6f, 0x6d,
|
||||
0x6f, 0x12, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0x22, 0x0a, 0x0e, 0x43, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d,
|
||||
0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69,
|
||||
0x64, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x22, 0xc7, 0x02, 0x0a, 0x0d,
|
||||
0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a,
|
||||
0x73, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0xf9, 0x01,
|
||||
0x0a, 0x0d, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12,
|
||||
0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75,
|
||||
0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x50, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
|
||||
0x52, 0x09, 0x70, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f,
|
||||
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63,
|
||||
0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63,
|
||||
0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a,
|
||||
0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x09, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x75,
|
||||
0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
||||
0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x26, 0x0a, 0x10, 0x44, 0x65, 0x6c,
|
||||
0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a,
|
||||
0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69,
|
||||
0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x02, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x50,
|
||||
0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
|
||||
0x70, 0x72, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74,
|
||||
0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12,
|
||||
0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
||||
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x75, 0x70, 0x64,
|
||||
0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x61,
|
||||
0x6e, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f,
|
||||
0x6d, 0x70, 0x61, 0x6e, 0x79, 0x53, 0x69, 0x67, 0x6e, 0x12, 0x2a, 0x0a, 0x10, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x72, 0x61, 0x63, 0x74, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x44, 0x75, 0x72,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x26, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x42, 0x75, 0x6e, 0x64,
|
||||
0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0x8d, 0x01,
|
||||
0x0a, 0x11, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53,
|
||||
0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53,
|
||||
0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
|
||||
0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e,
|
||||
0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x22, 0x5b, 0x0a,
|
||||
0x12, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x01,
|
||||
0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75,
|
||||
0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x07, 0x62, 0x75, 0x6e,
|
||||
0x64, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x29, 0x0a, 0x13, 0x42, 0x75,
|
||||
0x6e, 0x64, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||
0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0x57, 0x0a, 0x14, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x44,
|
||||
0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a,
|
||||
0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e,
|
||||
0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72, 0x6f,
|
||||
0x66, 0x69, 0x6c, 0x65, 0x52, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03,
|
||||
0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0xc5,
|
||||
0x04, 0x0a, 0x0b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75,
|
||||
0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x75, 0x69, 0x64,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x75,
|
||||
0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x44,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72,
|
||||
0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x75,
|
||||
0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
|
||||
0x72, 0x4e, 0x75, 0x6d, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74,
|
||||
0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75,
|
||||
0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74,
|
||||
0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65,
|
||||
0x12, 0x22, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74,
|
||||
0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x74,
|
||||
0x72, 0x61, 0x63, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72,
|
||||
0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75,
|
||||
0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65,
|
||||
0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x69,
|
||||
0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20,
|
||||
0x01, 0x28, 0x03, 0x52, 0x07, 0x70, 0x61, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07,
|
||||
0x70, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70,
|
||||
0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f,
|
||||
0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69,
|
||||
0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x12, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74,
|
||||
0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x12, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f,
|
||||
0x6e, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0f,
|
||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07,
|
||||
0x6f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f,
|
||||
0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, 0x6e, 0x64,
|
||||
0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61,
|
||||
0x63, 0x74, 0x4e, 0x6f, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74,
|
||||
0x72, 0x61, 0x63, 0x74, 0x4e, 0x6f, 0x22, 0xb1, 0x03, 0x0a, 0x13, 0x4f, 0x72, 0x64, 0x65, 0x72,
|
||||
0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61,
|
||||
0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x20,
|
||||
0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x75, 0x6d,
|
||||
0x12, 0x22, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x55,
|
||||
0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65,
|
||||
0x55, 0x55, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06,
|
||||
0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65,
|
||||
0x4e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x75, 0x6e, 0x64,
|
||||
0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53,
|
||||
0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65,
|
||||
0x12, 0x24, 0x0a, 0x0d, 0x65, 0x6e, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d,
|
||||
0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x6e, 0x64, 0x53, 0x69, 0x67, 0x6e,
|
||||
0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50,
|
||||
0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74,
|
||||
0x61, 0x72, 0x74, 0x50, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x6e,
|
||||
0x64, 0x50, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
|
||||
0x65, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75,
|
||||
0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x44, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
|
||||
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x44, 0x22, 0x65, 0x0a, 0x14, 0x4f, 0x72,
|
||||
0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72,
|
||||
0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c,
|
||||
0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 0x0c, 0x6f,
|
||||
0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74,
|
||||
0x64, 0x22, 0x71, 0x0a, 0x11, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52,
|
||||
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61,
|
||||
0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61,
|
||||
0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f,
|
||||
0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e,
|
||||
0x74, 0x65, 0x6e, 0x74, 0x22, 0x5b, 0x0a, 0x12, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x62, 0x75,
|
||||
0x6e, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x75,
|
||||
0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69,
|
||||
0x6c, 0x65, 0x52, 0x07, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74,
|
||||
0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61,
|
||||
0x6c, 0x22, 0x69, 0x0a, 0x19, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
|
||||
0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12,
|
||||
0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75,
|
||||
0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x12, 0x1e, 0x0a, 0x0a,
|
||||
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x44, 0x22, 0x65, 0x0a, 0x1a,
|
||||
0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x44, 0x65, 0x74, 0x61,
|
||||
0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x6f, 0x72,
|
||||
0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||
0x6c, 0x22, 0x29, 0x0a, 0x13, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69,
|
||||
0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0x57, 0x0a, 0x14,
|
||||
0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70,
|
||||
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x06, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75,
|
||||
0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x06, 0x62, 0x75, 0x6e,
|
||||
0x64, 0x6c, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0xa5, 0x04, 0x0a, 0x0b, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52,
|
||||
0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x62, 0x75, 0x6e,
|
||||
0x64, 0x6c, 0x65, 0x55, 0x75, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62,
|
||||
0x75, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x75, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x75, 0x73,
|
||||
0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63,
|
||||
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x75, 0x73,
|
||||
0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
|
||||
0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x22, 0x0a, 0x0c, 0x63,
|
||||
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52,
|
||||
0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x6d, 0x6f, 0x75, 0x6e,
|
||||
0x74, 0x54, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x61, 0x6d, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x43,
|
||||
0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73,
|
||||
0x69, 0x67, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x73,
|
||||
0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
||||
0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x69, 0x67,
|
||||
0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73,
|
||||
0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79,
|
||||
0x54, 0x79, 0x70, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x70, 0x61, 0x79, 0x54,
|
||||
0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2c, 0x0a,
|
||||
0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
|
||||
0x49, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f,
|
||||
0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x12, 0x63,
|
||||
0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x72,
|
||||
0x6c, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x6f, 0x75,
|
||||
0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61,
|
||||
0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x18, 0x10,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x12, 0x1e, 0x0a,
|
||||
0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x91, 0x03,
|
||||
0x0a, 0x13, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x04, 0x70, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67,
|
||||
0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x61, 0x67,
|
||||
0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65,
|
||||
0x72, 0x4e, 0x75, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x75, 0x73, 0x74,
|
||||
0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x75, 0x6d, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f,
|
||||
0x6d, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63,
|
||||
0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x62,
|
||||
0x75, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x55, 0x49, 0x44, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x55, 0x55, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x6f,
|
||||
0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x72,
|
||||
0x64, 0x65, 0x72, 0x4e, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18,
|
||||
0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1e, 0x0a,
|
||||
0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x0a, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x28, 0x0a,
|
||||
0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65,
|
||||
0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x53, 0x69, 0x67,
|
||||
0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x65, 0x6e, 0x64, 0x53, 0x69,
|
||||
0x67, 0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
|
||||
0x65, 0x6e, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x22, 0x0a,
|
||||
0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x74, 0x61, 0x72, 0x74, 0x50, 0x61, 0x79, 0x54, 0x69, 0x6d,
|
||||
0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x54, 0x69, 0x6d, 0x65, 0x18,
|
||||
0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x64, 0x50, 0x61, 0x79, 0x54, 0x69, 0x6d,
|
||||
0x65, 0x22, 0x65, 0x0a, 0x14, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
|
||||
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0c, 0x6f, 0x72, 0x64,
|
||||
0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
|
||||
0x13, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65,
|
||||
0x63, 0x6f, 0x72, 0x64, 0x52, 0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72,
|
||||
0x64, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
|
||||
0x6d, 0x73, 0x67, 0x32, 0xe7, 0x05, 0x0a, 0x06, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x3f,
|
||||
0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x15,
|
||||
0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72,
|
||||
0x6f, 0x66, 0x69, 0x6c, 0x65, 0x1a, 0x16, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x43,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
|
||||
0x3f, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12,
|
||||
0x15, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50,
|
||||
0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x1a, 0x16, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e,
|
||||
0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||
0x12, 0x42, 0x0a, 0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65,
|
||||
0x12, 0x18, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x42, 0x75, 0x6e,
|
||||
0x64, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x62, 0x75, 0x6e,
|
||||
0x64, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||
0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0a, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4c, 0x69,
|
||||
0x73, 0x74, 0x12, 0x19, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64,
|
||||
0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e,
|
||||
0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0c, 0x42,
|
||||
0x75, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x1b, 0x2e, 0x62, 0x75,
|
||||
0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69,
|
||||
0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c,
|
||||
0x63, 0x6f, 0x72, 0x64, 0x52, 0x0c, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72,
|
||||
0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x05, 0x52, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x22, 0x2f, 0x0a, 0x19, 0x4f, 0x72, 0x64, 0x65,
|
||||
0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0x65, 0x0a, 0x1a, 0x4f, 0x72, 0x64,
|
||||
0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72,
|
||||
0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62,
|
||||
0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72,
|
||||
0x64, 0x52, 0x0b, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x73, 0x67,
|
||||
0x32, 0x9c, 0x05, 0x0a, 0x06, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x3f, 0x0a, 0x0c, 0x43,
|
||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x15, 0x2e, 0x62, 0x75,
|
||||
0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66, 0x69,
|
||||
0x6c, 0x65, 0x1a, 0x16, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x3f, 0x0a, 0x0c,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x15, 0x2e, 0x62,
|
||||
0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x66,
|
||||
0x69, 0x6c, 0x65, 0x1a, 0x16, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a,
|
||||
0x0c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x18, 0x2e,
|
||||
0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65,
|
||||
0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
|
||||
0x00, 0x12, 0x45, 0x0a, 0x0a, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12,
|
||||
0x19, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x62, 0x75, 0x6e,
|
||||
0x64, 0x6c, 0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0c, 0x42, 0x75, 0x6e, 0x64,
|
||||
0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x1b, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c,
|
||||
0x65, 0x2e, 0x42, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61,
|
||||
0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, 0x13, 0x2e,
|
||||
0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f,
|
||||
0x72, 0x64, 0x1a, 0x16, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x11,
|
||||
0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72,
|
||||
0x64, 0x12, 0x13, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72,
|
||||
0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x1a, 0x16, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e,
|
||||
0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||
0x12, 0x4b, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52,
|
||||
0x65, 0x63, 0x6f, 0x72, 0x64, 0x42, 0x79, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x12, 0x13,
|
||||
0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63,
|
||||
0x6f, 0x72, 0x64, 0x1a, 0x16, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6d,
|
||||
0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4f, 0x0a,
|
||||
0x10, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x4c, 0x69, 0x73,
|
||||
0x74, 0x12, 0x1b, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72,
|
||||
0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c,
|
||||
0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63,
|
||||
0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5d,
|
||||
0x0a, 0x12, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x44, 0x65,
|
||||
0x74, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72,
|
||||
0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c,
|
||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65,
|
||||
0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x44, 0x65, 0x74,
|
||||
0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0a, 0x5a,
|
||||
0x08, 0x2e, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x33,
|
||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x42,
|
||||
0x75, 0x6e, 0x64, 0x6c, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f,
|
||||
0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x13, 0x2e, 0x62, 0x75,
|
||||
0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
|
||||
0x1a, 0x16, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
|
||||
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x12, 0x55, 0x70,
|
||||
0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73,
|
||||
0x12, 0x13, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52,
|
||||
0x65, 0x63, 0x6f, 0x72, 0x64, 0x1a, 0x16, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x43,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
|
||||
0x4f, 0x0a, 0x10, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x4c,
|
||||
0x69, 0x73, 0x74, 0x12, 0x1b, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64,
|
||||
0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
||||
0x1a, 0x1c, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52,
|
||||
0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00,
|
||||
0x12, 0x5d, 0x0a, 0x12, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73,
|
||||
0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x21, 0x2e, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x2e,
|
||||
0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x44, 0x65, 0x74, 0x61,
|
||||
0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x62, 0x75, 0x6e, 0x64,
|
||||
0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x44,
|
||||
0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42,
|
||||
0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x62, 0x75, 0x6e, 0x64, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -1219,23 +1125,21 @@ var file_pb_bundle_proto_depIdxs = []int32{
|
||||
2, // 6: bundle.Bundle.DeleteBundle:input_type -> bundle.DelBundleRequest
|
||||
3, // 7: bundle.Bundle.BundleList:input_type -> bundle.BundleListRequest
|
||||
5, // 8: bundle.Bundle.BundleDetail:input_type -> bundle.BundleDetailRequest
|
||||
7, // 9: bundle.Bundle.CreateOrderRecord:input_type -> bundle.OrderRecord
|
||||
7, // 10: bundle.Bundle.UpdateOrderRecord:input_type -> bundle.OrderRecord
|
||||
7, // 11: bundle.Bundle.UpdateOrderRecordByOrderNo:input_type -> bundle.OrderRecord
|
||||
8, // 12: bundle.Bundle.OrderRecordsList:input_type -> bundle.OrderRecordsRequest
|
||||
10, // 13: bundle.Bundle.OrderRecordsDetail:input_type -> bundle.OrderRecordsDetailRequest
|
||||
0, // 14: bundle.Bundle.CreateBundle:output_type -> bundle.CommonResponse
|
||||
0, // 15: bundle.Bundle.UpdateBundle:output_type -> bundle.CommonResponse
|
||||
0, // 16: bundle.Bundle.DeleteBundle:output_type -> bundle.CommonResponse
|
||||
4, // 17: bundle.Bundle.BundleList:output_type -> bundle.BundleListResponse
|
||||
6, // 18: bundle.Bundle.BundleDetail:output_type -> bundle.BundleDetailResponse
|
||||
0, // 19: bundle.Bundle.CreateOrderRecord:output_type -> bundle.CommonResponse
|
||||
0, // 20: bundle.Bundle.UpdateOrderRecord:output_type -> bundle.CommonResponse
|
||||
0, // 21: bundle.Bundle.UpdateOrderRecordByOrderNo:output_type -> bundle.CommonResponse
|
||||
9, // 22: bundle.Bundle.OrderRecordsList:output_type -> bundle.OrderRecordsResponse
|
||||
11, // 23: bundle.Bundle.OrderRecordsDetail:output_type -> bundle.OrderRecordsDetailResponse
|
||||
14, // [14:24] is the sub-list for method output_type
|
||||
4, // [4:14] is the sub-list for method input_type
|
||||
7, // 9: bundle.Bundle.CreateOrderRecords:input_type -> bundle.OrderRecord
|
||||
7, // 10: bundle.Bundle.UpdateOrderRecords:input_type -> bundle.OrderRecord
|
||||
8, // 11: bundle.Bundle.OrderRecordsList:input_type -> bundle.OrderRecordsRequest
|
||||
10, // 12: bundle.Bundle.OrderRecordsDetail:input_type -> bundle.OrderRecordsDetailRequest
|
||||
0, // 13: bundle.Bundle.CreateBundle:output_type -> bundle.CommonResponse
|
||||
0, // 14: bundle.Bundle.UpdateBundle:output_type -> bundle.CommonResponse
|
||||
0, // 15: bundle.Bundle.DeleteBundle:output_type -> bundle.CommonResponse
|
||||
4, // 16: bundle.Bundle.BundleList:output_type -> bundle.BundleListResponse
|
||||
6, // 17: bundle.Bundle.BundleDetail:output_type -> bundle.BundleDetailResponse
|
||||
0, // 18: bundle.Bundle.CreateOrderRecords:output_type -> bundle.CommonResponse
|
||||
0, // 19: bundle.Bundle.UpdateOrderRecords:output_type -> bundle.CommonResponse
|
||||
9, // 20: bundle.Bundle.OrderRecordsList:output_type -> bundle.OrderRecordsResponse
|
||||
11, // 21: bundle.Bundle.OrderRecordsDetail:output_type -> bundle.OrderRecordsDetailResponse
|
||||
13, // [13:22] is the sub-list for method output_type
|
||||
4, // [4:13] is the sub-list for method input_type
|
||||
4, // [4:4] is the sub-list for extension type_name
|
||||
4, // [4:4] is the sub-list for extension extendee
|
||||
0, // [0:4] is the sub-list for field type_name
|
||||
|
@ -11,9 +11,8 @@ service Bundle {
|
||||
rpc BundleList(BundleListRequest) returns (BundleListResponse) {}
|
||||
rpc BundleDetail(BundleDetailRequest) returns (BundleDetailResponse) {}
|
||||
|
||||
rpc CreateOrderRecord(OrderRecord) returns (CommonResponse) {}
|
||||
rpc UpdateOrderRecord(OrderRecord) returns (CommonResponse) {}
|
||||
rpc UpdateOrderRecordByOrderNo(OrderRecord) returns (CommonResponse) {}
|
||||
rpc CreateOrderRecords(OrderRecord) returns (CommonResponse) {}
|
||||
rpc UpdateOrderRecords(OrderRecord) returns (CommonResponse) {}
|
||||
rpc OrderRecordsList(OrderRecordsRequest) returns (OrderRecordsResponse) {}
|
||||
rpc OrderRecordsDetail(OrderRecordsDetailRequest) returns (OrderRecordsDetailResponse) {}
|
||||
|
||||
@ -21,22 +20,18 @@ service Bundle {
|
||||
|
||||
message CommonResponse {
|
||||
string msg = 1 [json_name = "msg"];
|
||||
string uuid = 2 [json_name = "uuid"];
|
||||
string orderNo = 3 [json_name = "orderNo"];
|
||||
}
|
||||
|
||||
message BundleProfile {
|
||||
string uuid = 1 [json_name = "uuid"];
|
||||
string name = 2 [json_name = "name"];
|
||||
float price = 3 [json_name = "price"];
|
||||
int64 price = 3 [json_name = "price"];
|
||||
int64 PriceType = 4 [json_name = "priceType"];
|
||||
string content = 5 [json_name = "content"];
|
||||
string contract = 6 [json_name = "contract"];
|
||||
string language = 7 [json_name = "language"];
|
||||
string createdAt = 8 [json_name = "createdAt"];
|
||||
string updatedAt = 9 [json_name = "updatedAt"];
|
||||
string companySign = 10 [json_name = "companySign"];
|
||||
int64 contractDuration = 11 [json_name = "contractDuration"];
|
||||
}
|
||||
|
||||
message DelBundleRequest {
|
||||
@ -48,7 +43,6 @@ message BundleListRequest {
|
||||
int32 pageSize = 2 [json_name = "pageSize"];
|
||||
string name = 3 [json_name = "name"];
|
||||
string content = 4 [json_name = "content"];
|
||||
string language = 5 [json_name = "language"];
|
||||
}
|
||||
|
||||
message BundleListResponse {
|
||||
@ -71,7 +65,7 @@ message OrderRecord {
|
||||
string customerID = 3 [json_name = "customerID"];
|
||||
string customerNum = 4 [json_name = "customerNum"];
|
||||
string customerName = 5 [json_name = "customerName"];
|
||||
float amount = 6 [json_name = "amount"];
|
||||
int64 amount = 6 [json_name = "amount"];
|
||||
int64 amountType = 7 [json_name = "amountType"];
|
||||
string signContract = 8 [json_name = "signContract"];
|
||||
string signature = 9 [json_name = "signature"];
|
||||
@ -80,10 +74,9 @@ message OrderRecord {
|
||||
string payTime = 12 [json_name = "payTime"];
|
||||
string checkoutSessionId = 13 [json_name = "checkoutSessionId"];
|
||||
string checkoutSessionUrl = 14 [json_name = "checkoutSessionUrl"];
|
||||
int64 status = 15 [json_name = "status"];
|
||||
string status = 15 [json_name = "status"];
|
||||
string orderNo = 16 [json_name = "orderNo"];
|
||||
string bundleName = 17 [json_name = "bundleName"];
|
||||
string contractNo = 18 [json_name = "contractNo"];
|
||||
}
|
||||
|
||||
message OrderRecordsRequest {
|
||||
@ -99,7 +92,6 @@ message OrderRecordsRequest {
|
||||
string endSignedTime = 10 [json_name = "endSignedTime"];
|
||||
string startPayTime = 11 [json_name = "startPayTime"];
|
||||
string endPayTime = 12 [json_name = "endPayTime"];
|
||||
string customerID = 13 [json_name = "customerID"];
|
||||
}
|
||||
|
||||
message OrderRecordsResponse {
|
||||
@ -109,8 +101,6 @@ message OrderRecordsResponse {
|
||||
|
||||
message OrderRecordsDetailRequest {
|
||||
string uuid = 1 [json_name = "uuid"];
|
||||
string orderNo = 2 [json_name = "orderNo"];
|
||||
string customerID = 3 [json_name = "customerID"];
|
||||
}
|
||||
|
||||
message OrderRecordsDetailResponse {
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-triple v1.0.8
|
||||
// - protoc v3.10.1
|
||||
// - protoc-gen-go-triple v1.0.5
|
||||
// - protoc v5.29.0--rc3
|
||||
// source: pb/bundle.proto
|
||||
|
||||
package bundle
|
||||
@ -33,9 +33,8 @@ type BundleClient interface {
|
||||
DeleteBundle(ctx context.Context, in *DelBundleRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
BundleList(ctx context.Context, in *BundleListRequest, opts ...grpc_go.CallOption) (*BundleListResponse, common.ErrorWithAttachment)
|
||||
BundleDetail(ctx context.Context, in *BundleDetailRequest, opts ...grpc_go.CallOption) (*BundleDetailResponse, common.ErrorWithAttachment)
|
||||
CreateOrderRecord(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
UpdateOrderRecord(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
UpdateOrderRecordByOrderNo(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
CreateOrderRecords(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
UpdateOrderRecords(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||
OrderRecordsList(ctx context.Context, in *OrderRecordsRequest, opts ...grpc_go.CallOption) (*OrderRecordsResponse, common.ErrorWithAttachment)
|
||||
OrderRecordsDetail(ctx context.Context, in *OrderRecordsDetailRequest, opts ...grpc_go.CallOption) (*OrderRecordsDetailResponse, common.ErrorWithAttachment)
|
||||
}
|
||||
@ -45,16 +44,15 @@ type bundleClient struct {
|
||||
}
|
||||
|
||||
type BundleClientImpl struct {
|
||||
CreateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error)
|
||||
UpdateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error)
|
||||
DeleteBundle func(ctx context.Context, in *DelBundleRequest) (*CommonResponse, error)
|
||||
BundleList func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
|
||||
BundleDetail func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponse, error)
|
||||
CreateOrderRecord func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
|
||||
UpdateOrderRecord func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
|
||||
UpdateOrderRecordByOrderNo func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
|
||||
OrderRecordsList func(ctx context.Context, in *OrderRecordsRequest) (*OrderRecordsResponse, error)
|
||||
OrderRecordsDetail func(ctx context.Context, in *OrderRecordsDetailRequest) (*OrderRecordsDetailResponse, error)
|
||||
CreateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error)
|
||||
UpdateBundle func(ctx context.Context, in *BundleProfile) (*CommonResponse, error)
|
||||
DeleteBundle func(ctx context.Context, in *DelBundleRequest) (*CommonResponse, error)
|
||||
BundleList func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
|
||||
BundleDetail func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponse, error)
|
||||
CreateOrderRecords func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
|
||||
UpdateOrderRecords func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
|
||||
OrderRecordsList func(ctx context.Context, in *OrderRecordsRequest) (*OrderRecordsResponse, error)
|
||||
OrderRecordsDetail func(ctx context.Context, in *OrderRecordsDetailRequest) (*OrderRecordsDetailResponse, error)
|
||||
}
|
||||
|
||||
func (c *BundleClientImpl) GetDubboStub(cc *triple.TripleConn) BundleClient {
|
||||
@ -99,22 +97,16 @@ func (c *bundleClient) BundleDetail(ctx context.Context, in *BundleDetailRequest
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BundleDetail", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) CreateOrderRecord(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||
func (c *bundleClient) CreateOrderRecords(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||
out := new(CommonResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateOrderRecord", in, out)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateOrderRecords", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) UpdateOrderRecord(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||
func (c *bundleClient) UpdateOrderRecords(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||
out := new(CommonResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateOrderRecord", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) UpdateOrderRecordByOrderNo(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||
out := new(CommonResponse)
|
||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateOrderRecordByOrderNo", in, out)
|
||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/UpdateOrderRecords", in, out)
|
||||
}
|
||||
|
||||
func (c *bundleClient) OrderRecordsList(ctx context.Context, in *OrderRecordsRequest, opts ...grpc_go.CallOption) (*OrderRecordsResponse, common.ErrorWithAttachment) {
|
||||
@ -138,9 +130,8 @@ type BundleServer interface {
|
||||
DeleteBundle(context.Context, *DelBundleRequest) (*CommonResponse, error)
|
||||
BundleList(context.Context, *BundleListRequest) (*BundleListResponse, error)
|
||||
BundleDetail(context.Context, *BundleDetailRequest) (*BundleDetailResponse, error)
|
||||
CreateOrderRecord(context.Context, *OrderRecord) (*CommonResponse, error)
|
||||
UpdateOrderRecord(context.Context, *OrderRecord) (*CommonResponse, error)
|
||||
UpdateOrderRecordByOrderNo(context.Context, *OrderRecord) (*CommonResponse, error)
|
||||
CreateOrderRecords(context.Context, *OrderRecord) (*CommonResponse, error)
|
||||
UpdateOrderRecords(context.Context, *OrderRecord) (*CommonResponse, error)
|
||||
OrderRecordsList(context.Context, *OrderRecordsRequest) (*OrderRecordsResponse, error)
|
||||
OrderRecordsDetail(context.Context, *OrderRecordsDetailRequest) (*OrderRecordsDetailResponse, error)
|
||||
mustEmbedUnimplementedBundleServer()
|
||||
@ -166,14 +157,11 @@ func (UnimplementedBundleServer) BundleList(context.Context, *BundleListRequest)
|
||||
func (UnimplementedBundleServer) BundleDetail(context.Context, *BundleDetailRequest) (*BundleDetailResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BundleDetail not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) CreateOrderRecord(context.Context, *OrderRecord) (*CommonResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateOrderRecord not implemented")
|
||||
func (UnimplementedBundleServer) CreateOrderRecords(context.Context, *OrderRecord) (*CommonResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method CreateOrderRecords not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) UpdateOrderRecord(context.Context, *OrderRecord) (*CommonResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateOrderRecord not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) UpdateOrderRecordByOrderNo(context.Context, *OrderRecord) (*CommonResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateOrderRecordByOrderNo not implemented")
|
||||
func (UnimplementedBundleServer) UpdateOrderRecords(context.Context, *OrderRecord) (*CommonResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateOrderRecords not implemented")
|
||||
}
|
||||
func (UnimplementedBundleServer) OrderRecordsList(context.Context, *OrderRecordsRequest) (*OrderRecordsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method OrderRecordsList not implemented")
|
||||
@ -354,7 +342,7 @@ func _Bundle_BundleDetail_Handler(srv interface{}, ctx context.Context, dec func
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bundle_CreateOrderRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _Bundle_CreateOrderRecords_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(OrderRecord)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -367,7 +355,7 @@ func _Bundle_CreateOrderRecord_Handler(srv interface{}, ctx context.Context, dec
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("CreateOrderRecord", args, invAttachment)
|
||||
invo := invocation.NewRPCInvocation("CreateOrderRecords", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
@ -383,7 +371,7 @@ func _Bundle_CreateOrderRecord_Handler(srv interface{}, ctx context.Context, dec
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bundle_UpdateOrderRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
func _Bundle_UpdateOrderRecords_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(OrderRecord)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
@ -396,36 +384,7 @@ func _Bundle_UpdateOrderRecord_Handler(srv interface{}, ctx context.Context, dec
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("UpdateOrderRecord", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
info := &grpc_go.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ctx.Value("XXX_TRIPLE_GO_INTERFACE_NAME").(string),
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Bundle_UpdateOrderRecordByOrderNo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(OrderRecord)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
base := srv.(dubbo3.Dubbo3GrpcService)
|
||||
args := []interface{}{}
|
||||
args = append(args, in)
|
||||
md, _ := metadata.FromIncomingContext(ctx)
|
||||
invAttachment := make(map[string]interface{}, len(md))
|
||||
for k, v := range md {
|
||||
invAttachment[k] = v
|
||||
}
|
||||
invo := invocation.NewRPCInvocation("UpdateOrderRecordByOrderNo", args, invAttachment)
|
||||
invo := invocation.NewRPCInvocation("UpdateOrderRecords", args, invAttachment)
|
||||
if interceptor == nil {
|
||||
result := base.XXX_GetProxyImpl().Invoke(ctx, invo)
|
||||
return result, result.Error()
|
||||
@ -527,16 +486,12 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
||||
Handler: _Bundle_BundleDetail_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "CreateOrderRecord",
|
||||
Handler: _Bundle_CreateOrderRecord_Handler,
|
||||
MethodName: "CreateOrderRecords",
|
||||
Handler: _Bundle_CreateOrderRecords_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateOrderRecord",
|
||||
Handler: _Bundle_UpdateOrderRecord_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "UpdateOrderRecordByOrderNo",
|
||||
Handler: _Bundle_UpdateOrderRecordByOrderNo_Handler,
|
||||
MethodName: "UpdateOrderRecords",
|
||||
Handler: _Bundle_UpdateOrderRecords_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "OrderRecordsList",
|
||||
|
25636
api/order/order.pb.go
25636
api/order/order.pb.go
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -21,6 +21,7 @@ import (
|
||||
"fmt"
|
||||
"fonchain-fiee/cmd/config"
|
||||
"fonchain-fiee/pkg/cache"
|
||||
"fonchain-fiee/pkg/common/gpt"
|
||||
"fonchain-fiee/pkg/router"
|
||||
)
|
||||
|
||||
@ -44,7 +45,7 @@ func bootstrap() (err error) {
|
||||
fmt.Println(configEnv)
|
||||
fmt.Println(config.AppConfig)
|
||||
|
||||
////redis
|
||||
//redis
|
||||
redisConfig := cache.RedisConfig{
|
||||
RedisDB: configEnv.Redis.RedisDB,
|
||||
RedisAddr: configEnv.Redis.RedisAddr,
|
||||
@ -53,7 +54,7 @@ func bootstrap() (err error) {
|
||||
}
|
||||
|
||||
cache.LoadRedis(redisConfig)
|
||||
//
|
||||
//gpt.InitSet(configEnv.Ai.Host, configEnv.Ai.TelNum, configEnv.Ai.Password)
|
||||
|
||||
gpt.InitSet(configEnv.Ai.Host, configEnv.Ai.TelNum, configEnv.Ai.Password)
|
||||
return nil
|
||||
}
|
||||
|
@ -21,11 +21,10 @@ BucketName = "fontree-test"
|
||||
BaseDir = "fonchain-main"
|
||||
CdnHost = "https://cdn-test.szjixun.cn"
|
||||
[redis]
|
||||
RedisDB = "2"
|
||||
RedisDB = "1"
|
||||
RedisAddr = "127.0.0.1:6379"
|
||||
RedisPW = ""
|
||||
RedisDBNAme = "2"
|
||||
|
||||
RedisDBNAme = "1"
|
||||
|
||||
[ai]
|
||||
Host = "https://erpapi.fontree.cn"
|
||||
|
@ -13,8 +13,4 @@ dubbo:
|
||||
# filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||
# params:
|
||||
# .accessKeyId: "Accountksl"
|
||||
# .secretAccessKey: "BSDY-FDF1-Fontree_account"
|
||||
BundleClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.fiee.bundle # must be compatible with grpc or dubbo-java
|
||||
# .secretAccessKey: "BSDY-FDF1-Fontree_account"
|
1
data/init.go
Normal file
1
data/init.go
Normal file
@ -0,0 +1 @@
|
||||
package data
|
BIN
data/simfang.ttf
BIN
data/simfang.ttf
Binary file not shown.
@ -22,10 +22,10 @@ BaseDir = "fiee"
|
||||
CdnHost = "https://cdn-test.szjixun.cn"
|
||||
|
||||
[redis]
|
||||
RedisDB = "2"
|
||||
RedisDB = "1"
|
||||
RedisAddr = "172.16.100.114:6379"
|
||||
RedisPW = "kP6tW4tS3qB2dW4aE6uI5cX2"
|
||||
RedisDBNAme = "2"
|
||||
RedisDBNAme = "1"
|
||||
|
||||
[ai]
|
||||
Host = "https://erpapi.fontree.cn"
|
||||
@ -33,4 +33,4 @@ TelNum = "18021272627"
|
||||
Password = "Gy.123456"
|
||||
|
||||
[stripe]
|
||||
Webhookkey = "whsec_5ru2Z9KsFixSvamAHgcvCBxufRTuHsyQ"
|
||||
Webhookkey = "we_1QuursAB1Vm8VfJquKmHQSVg"
|
||||
|
@ -4,8 +4,7 @@ dubbo:
|
||||
protocol: zookeeper
|
||||
timeout: 3s
|
||||
# address: 121.229.45.214:9004
|
||||
address: 172.16.100.93:2181
|
||||
# address: 127.0.0.1:2181
|
||||
address: 127.0.0.1:2181
|
||||
# address: 114.218.158.24:2181
|
||||
consumer:
|
||||
filter: tracing
|
||||
@ -15,7 +14,7 @@ dubbo:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.order # must be compatible with grpc or dubbo-java
|
||||
# filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||
filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||
params:
|
||||
.accessKeyId: "SYD8-order-04"
|
||||
.secretAccessKey: "Al-order-FDF112"
|
||||
@ -23,8 +22,9 @@ dubbo:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.fiee.bundle # must be compatible with grpc or dubbo-java
|
||||
filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||
AccountClientImpl:
|
||||
protocol: tri
|
||||
retries: 3
|
||||
interface: com.fontree.microservices.common.micro.account
|
||||
# filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute,pshutdown,auth,fonValidateFilter
|
||||
# filter: echo,metrics,token,accesslog,sign,tps,generic_service,execute,pshutdown,auth,fonValidateFilter
|
@ -14,10 +14,10 @@ BosBaseDir = "fonchain-main"
|
||||
BosHttp = "https://"
|
||||
|
||||
[redis]
|
||||
RedisDB = "2"
|
||||
RedisDB = "1"
|
||||
RedisAddr = "svc-fontree-redis-service:6379"
|
||||
RedisPW = "fonchain_opv:kP6tW4tS3qB2dW4aE6uI5cX2"
|
||||
RedisDBNAme = "2"
|
||||
RedisDBNAme = "1"
|
||||
|
||||
[ai]
|
||||
Host = "https://erpapi.fontree.cn"
|
||||
@ -27,10 +27,7 @@ Password = "Gy.123456"
|
||||
[oss]
|
||||
AccessKeyId = "LTAI5tHfjSmWXHqfWgaL7Uo5"
|
||||
AccessKeySecret = "kOPctFZ3DHsbdSSym1fLyDK39hkzPI"
|
||||
Endpoint = "oss-cn-hangzhou.aliyuncs.com"
|
||||
Endpoint = "oss-cn-hangzhou-internal.aliyuncs.com"
|
||||
BucketName = "erp-k8s-store"
|
||||
BaseDir = "fiee"
|
||||
CdnHost = "https://e-cdn.fontree.cn"
|
||||
|
||||
[stripe]
|
||||
Webhookkey = "whsec_Mol32WD1KcKHUdYsSwap0LR03q2g9qNY"
|
||||
CdnHost = "https://e-cdn.fontree.cn"
|
@ -4,7 +4,7 @@ dubbo:
|
||||
protocol: zookeeper
|
||||
timeout: 3s
|
||||
# address: 121.229.45.214:9004
|
||||
address: zookeeper:2181
|
||||
address: 127.0.0.1:2181
|
||||
# address: 114.218.158.24:2181
|
||||
consumer:
|
||||
filter: tracing
|
||||
@ -14,7 +14,7 @@ dubbo:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.order # must be compatible with grpc or dubbo-java
|
||||
# filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||
filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||
params:
|
||||
.accessKeyId: "SYD8-order-04"
|
||||
.secretAccessKey: "Al-order-FDF112"
|
||||
@ -22,7 +22,8 @@ dubbo:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.fiee.bundle # must be compatible with grpc or dubbo-java
|
||||
filter: cshutdown,sign,fonDomainFilter,fonValidateFilter
|
||||
AccountClientImpl:
|
||||
protocol: tri
|
||||
retries: 0
|
||||
interface: com.fontree.microservices.common.micro.account
|
||||
interface: com.fontree.microservices.common.micro.account
|
40
go.mod
40
go.mod
@ -2,23 +2,29 @@ module fonchain-fiee
|
||||
|
||||
go 1.18
|
||||
|
||||
//github.com/fonchain_enterprise/utils/aes => ./docs/utils/aes
|
||||
//github.com/fonchain_enterprise/utils/chain => ./docs/utils/chain
|
||||
//github.com/fonchain_enterprise/utils/jwt => ./docs/utils/jwt
|
||||
//github.com/fonchain_enterprise/utils/logger => ./docs/utils/logger
|
||||
//github.com/fonchain_enterprise/utils/rand => ./docs/utils/rand
|
||||
replace (
|
||||
//github.com/fonchain_enterprise/utils/aes => ./docs/utils/aes
|
||||
//github.com/fonchain_enterprise/utils/chain => ./docs/utils/chain
|
||||
//github.com/fonchain_enterprise/utils/jwt => ./docs/utils/jwt
|
||||
//github.com/fonchain_enterprise/utils/logger => ./docs/utils/logger
|
||||
//github.com/fonchain_enterprise/utils/rand => ./docs/utils/rand
|
||||
|
||||
//github.com/fonchain/electronic-contract => ../../electronic-contract
|
||||
//github.com/fonchain_enterprise/utils/aes => ../utils/aes
|
||||
//github.com/fonchain_enterprise/utils/baidu => ../utils/baidu
|
||||
//github.com/fonchain_enterprise/utils/bankQuery => ../utils/bankQuery
|
||||
//github.com/fonchain_enterprise/utils/chain => ../utils/chain
|
||||
//github.com/fonchain_enterprise/utils/feie => ../utils/feie
|
||||
//github.com/fonchain_enterprise/utils/ipAddrQuery => ../utils/ipAddrQuery
|
||||
//github.com/fonchain_enterprise/utils/jwt => ../utils/jwt
|
||||
//github.com/fonchain_enterprise/utils/logger => ../utils/logger
|
||||
//replace github.com/fonchain_enterprise/utils/objstorage => ../../tyfon-新/utils/objstorage
|
||||
replace github.com/fonchain_enterprise/utils/objstorage => ../utils/objstorage
|
||||
github.com/fonchain/electronic-contract => ../../electronic-contract
|
||||
github.com/fonchain_enterprise/utils/aes => ../utils/aes
|
||||
github.com/fonchain_enterprise/utils/baidu => ../utils/baidu
|
||||
github.com/fonchain_enterprise/utils/bankQuery => ../utils/bankQuery
|
||||
github.com/fonchain_enterprise/utils/chain => ../utils/chain
|
||||
github.com/fonchain_enterprise/utils/feie => ../utils/feie
|
||||
github.com/fonchain_enterprise/utils/ipAddrQuery => ../utils/ipAddrQuery
|
||||
github.com/fonchain_enterprise/utils/jwt => ../utils/jwt
|
||||
github.com/fonchain_enterprise/utils/logger => ../utils/logger
|
||||
github.com/fonchain_enterprise/utils/objstorage => ../utils/objstorage
|
||||
github.com/fonchain_enterprise/utils/ocr => ../utils/ocr
|
||||
github.com/fonchain_enterprise/utils/pay => ../utils/pay
|
||||
github.com/fonchain_enterprise/utils/rand => ../utils/rand
|
||||
github.com/fonchain_enterprise/utils/utils => ../utils/utils
|
||||
|
||||
)
|
||||
|
||||
require (
|
||||
dubbo.apache.org/dubbo-go/v3 v3.0.2
|
||||
@ -114,7 +120,6 @@ require (
|
||||
github.com/gin-contrib/pprof v1.4.0
|
||||
github.com/go-redis/redis v6.15.9+incompatible
|
||||
github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd
|
||||
github.com/signintech/gopdf v0.29.2
|
||||
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
|
||||
github.com/spf13/viper v1.7.1
|
||||
github.com/u2takey/ffmpeg-go v0.5.0
|
||||
@ -164,7 +169,6 @@ require (
|
||||
github.com/nxadm/tail v1.4.11 // indirect
|
||||
github.com/onsi/ginkgo v1.16.5 // indirect
|
||||
github.com/onsi/gomega v1.18.1 // indirect
|
||||
github.com/phpdave11/gofpdi v1.0.14-0.20211212211723-1f10f9844311 // indirect
|
||||
github.com/pierrec/lz4 v2.5.2+incompatible // indirect
|
||||
github.com/polarismesh/polaris-go v1.1.0 // indirect
|
||||
github.com/shirou/gopsutil/v3 v3.21.6 // indirect
|
||||
|
4
go.sum
4
go.sum
@ -675,8 +675,6 @@ github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZO
|
||||
github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ=
|
||||
github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4=
|
||||
github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac=
|
||||
github.com/phpdave11/gofpdi v1.0.14-0.20211212211723-1f10f9844311 h1:zyWXQ6vu27ETMpYsEMAsisQ+GqJ4e1TPvSNfdOPF0no=
|
||||
github.com/phpdave11/gofpdi v1.0.14-0.20211212211723-1f10f9844311/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
|
||||
github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
|
||||
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
|
||||
github.com/pierrec/lz4 v2.5.2+incompatible h1:WCjObylUIOlKy/+7Abdn34TLIkXiA4UWUMhxq9m9ZXI=
|
||||
@ -764,8 +762,6 @@ github.com/shirou/gopsutil v3.20.11+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMT
|
||||
github.com/shirou/gopsutil/v3 v3.21.6 h1:vU7jrp1Ic/2sHB7w6UNs7MIkn7ebVtTb5D9j45o9VYE=
|
||||
github.com/shirou/gopsutil/v3 v3.21.6/go.mod h1:JfVbDpIBLVzT8oKbvMg9P3wEIMDDpVn+LwHTKj0ST88=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/signintech/gopdf v0.29.2 h1:ksvYuHNwEBP8Mi/4q5MN1ZdW9OpMbWn3pEn3ewiWoSc=
|
||||
github.com/signintech/gopdf v0.29.2/go.mod h1:d23eO35GpEliSrF22eJ4bsM3wVeQJTjXTHq5x5qGKjA=
|
||||
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
|
||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
||||
github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
|
||||
|
@ -1,213 +0,0 @@
|
||||
package common
|
||||
|
||||
// upload
|
||||
const (
|
||||
ERROR_OPEN_FILE = "打开文件错误"
|
||||
ErrorImgExt = "图片格式错误"
|
||||
ErrorImgDecode = "图片解析错误"
|
||||
ERROR_ROTATE_IMG = "旋转图片出错"
|
||||
)
|
||||
|
||||
var EnMessages = map[string]string{
|
||||
"获取套餐列表失败": "Failed to get bundle list",
|
||||
"创建套餐信息失败": "Failed to create bundle information",
|
||||
"创建套餐信息成功": "Successfully created bundle information",
|
||||
"更新套餐信息失败": "Failed to update bundle information",
|
||||
"更新套餐信息成功": "Successfully updated bundle information",
|
||||
"删除套餐信息失败": "Failed to delete bundle information",
|
||||
"删除套餐信息成功": "Successfully deleted bundle information",
|
||||
"获取套餐信息失败": "Failed to get bundle information",
|
||||
"创建订单信息失败": "Failed to create order information",
|
||||
"创建订单信息成功": "Successfully created order information",
|
||||
"更新订单信息失败": "Failed to update order information",
|
||||
"更新订单信息成功": "Successfully updated order information",
|
||||
"获取订单信息失败": "Failed to get order information",
|
||||
"获取订单列表失败": "Failed to get order list",
|
||||
"缺少套餐UUID": "Missing bundle UUID",
|
||||
"缺少客户签名信息": "Missing customer signature",
|
||||
"插入签名失败": "Failed to insert signature",
|
||||
"缺少订单号": "Missing order number",
|
||||
"缺少订单信息": "Missing order information",
|
||||
"非当前用户订单信息不可操作": "Cannot operate on order information of other users",
|
||||
"订单已支付": "Order has been paid",
|
||||
"您已购买过套餐,无法再次购买": "You have already purchased this bundle and cannot purchase again",
|
||||
"查询支付信息失败": "Failed to query payment information",
|
||||
"下载文件失败": "Failed to download file",
|
||||
"上传文件失败": "Failed to upload file",
|
||||
"时间格式错误": "Invalid time format",
|
||||
|
||||
"账号或密码错误": "The account or password is incorrect",
|
||||
"账号或验证码错误": "The account or verification code is incorrect",
|
||||
"账号已存在": "Account already exists",
|
||||
"没有找到数据": "No data found",
|
||||
"已经发送过,验证码尚可用": "It was sent. The verification code is still working",
|
||||
"系统提示:已经发送过,验证码尚可用": "System message: Already sent, verification code is still available",
|
||||
"您的手机号当天发送次数过多,请联系管理员通过密码登录": "Your mobile phone number is sent too many times that day, please contact the administrator to log in through the password",
|
||||
"您的手机号验证码错误,请确认之后注册": "Your phone number verification code is incorrect, please confirm and register",
|
||||
"手机号不合法": "The phone number is illegal",
|
||||
"手机号未更改": "The phone number has not been changed",
|
||||
"新手机号过期": "New phone number expired",
|
||||
"验证码错误": "Verification code error",
|
||||
"验证码未发送": "The verification code was not sent",
|
||||
"账号不存在": "Account does not exist",
|
||||
"已实名": "In real name",
|
||||
"实名审核中,请勿重复提交": "During real-name audit, please do not submit repeatedly",
|
||||
"用户状态异常,无法进行审核": "The user is abnormal and cannot be audited. Procedure",
|
||||
"验证码已失效": "The verification code is invalid",
|
||||
"服务器错误": "Server error",
|
||||
"验证失败,请控制拼图对齐缺口": "Verification failed, please control puzzle alignment gap",
|
||||
"滑块验证状态不存在,请退出重试": "The slider verification status does not exist. Please exit and try again",
|
||||
}
|
||||
|
||||
var DeDEMessages = map[string]string{
|
||||
"获取套餐列表失败": "Fehler beim Abrufen der Bundle-Liste",
|
||||
"创建套餐信息失败": "Fehler beim Erstellen von Bundle-Informationen",
|
||||
"创建套餐信息成功": "Bundle-Informationen erfolgreich erstellt",
|
||||
"更新套餐信息失败": "Fehler beim Aktualisieren von Bundle-Informationen",
|
||||
"更新套餐信息成功": "Bundle-Informationen erfolgreich aktualisiert",
|
||||
"删除套餐信息失败": "Fehler beim Löschen von Bundle-Informationen",
|
||||
"删除套餐信息成功": "Bundle-Informationen erfolgreich gelöscht",
|
||||
"获取套餐信息失败": "Fehler beim Abrufen von Bundle-Informationen",
|
||||
"创建订单信息失败": "Fehler beim Erstellen von Bestellinformationen",
|
||||
"创建订单信息成功": "Bestellinformationen erfolgreich erstellt",
|
||||
"更新订单信息失败": "Fehler beim Aktualisieren von Bestellinformationen",
|
||||
"更新订单信息成功": "Bestellinformationen erfolgreich aktualisiert",
|
||||
"获取订单信息失败": "Fehler beim Abrufen von Bestellinformationen",
|
||||
"获取订单列表失败": "Fehler beim Abrufen der Bestellliste",
|
||||
"缺少套餐UUID": "Fehlende Bundle-UUID",
|
||||
"缺少客户签名信息": "Fehlende Kundenunterschrift",
|
||||
"插入签名失败": "Fehler beim Einfügen der Signatur",
|
||||
"缺少订单号": "Fehlende Bestellnummer",
|
||||
"缺少订单信息": "Fehlende Bestellinformationen",
|
||||
"非当前用户订单信息不可操作": "Bestellinformationen anderer Benutzer können nicht bearbeitet werden",
|
||||
"订单已支付": "Bestellung wurde bezahlt",
|
||||
"您已购买过套餐,无法再次购买": "Sie haben dieses Bundle bereits gekauft und können es nicht erneut kaufen",
|
||||
"查询支付信息失败": "Fehler beim Abfragen von Zahlungsinformationen",
|
||||
"下载文件失败": "Fehler beim Herunterladen der Datei",
|
||||
"上传文件失败": "Fehler beim Hochladen der Datei",
|
||||
"时间格式错误": "Ungültiges Zeitformat",
|
||||
|
||||
"账号或密码错误": "Konto oder Passwort falsch",
|
||||
"账号或验证码错误": "Konto oder Verifizierungscode falsch",
|
||||
"账号已存在": "Konto existiert bereits",
|
||||
"没有找到数据": "Keine Daten gefunden",
|
||||
"已经发送过,验证码尚可用": "Es wurde gesendet. Der Verifizierungscode funktioniert noch",
|
||||
"系统提示:已经发送过,验证码尚可用": "Systemnachricht: Bereits gesendet, Verifizierungscode ist noch verfügbar",
|
||||
"您的手机号当天发送次数过多,请联系管理员通过密码登录": "Ihre Telefonnummer wurde an diesem Tag zu oft gesendet. Bitte wenden Sie sich an den Administrator, um sich über das Passwort anzumelden",
|
||||
"您的手机号验证码错误,请确认之后注册": "Ihre Telefonnummer Verifizierungscode ist falsch, bitte bestätigen und registrieren",
|
||||
"手机号不合法": "Telefonnummer ungültig",
|
||||
"手机号未更改": "Telefonnummer wurde nicht geändert",
|
||||
"新手机号过期": "Neue Telefonnummer abgelaufen",
|
||||
"验证码错误": "Verifizierungscode falsch",
|
||||
"验证码未发送": "Der Verifizierungscode wurde nicht gesendet",
|
||||
"账号不存在": "Konto existiert nicht",
|
||||
"已实名": "In echt",
|
||||
"实名审核中,请勿重复提交": "Während der Echtheitsprüfung bitte nicht wiederholen",
|
||||
"用户状态异常,无法进行审核": "Der Benutzer ist abnorm und kann nicht geprüft werden. Verfahren",
|
||||
"验证码已失效": "Der Verifizierungscode ist ungültig",
|
||||
"服务器错误": "Serverfehler",
|
||||
"验证失败,请控制拼图对齐缺口": "Überprüfung fehlgeschlagen, bitte Steuerung Puzzle-Ausrichtungslücke",
|
||||
"滑块验证状态不存在,请退出重试": "Die krümmbestätigung existiert nicht. Bitte beenden sie den vorgang",
|
||||
}
|
||||
|
||||
var JaJPMessages = map[string]string{
|
||||
"获取套餐列表失败": "バンドルリストの取得に失敗しました",
|
||||
"创建套餐信息失败": "バンドル情報の作成に失敗しました",
|
||||
"创建套餐信息成功": "バンドル情報の作成に成功しました",
|
||||
"更新套餐信息失败": "バンドル情報の更新に失敗しました",
|
||||
"更新套餐信息成功": "バンドル情報の更新に成功しました",
|
||||
"删除套餐信息失败": "バンドル情報の削除に失敗しました",
|
||||
"删除套餐信息成功": "バンドル情報の削除に成功しました",
|
||||
"获取套餐信息失败": "バンドル情報の取得に失敗しました",
|
||||
"创建订单信息失败": "注文情報の作成に失敗しました",
|
||||
"创建订单信息成功": "注文情報の作成に成功しました",
|
||||
"更新订单信息失败": "注文情報の更新に失敗しました",
|
||||
"更新订单信息成功": "注文情報の更新に成功しました",
|
||||
"获取订单信息失败": "注文情報の取得に失敗しました",
|
||||
"获取订单列表失败": "注文リストの取得に失敗しました",
|
||||
"缺少套餐UUID": "バンドルUUIDがありません",
|
||||
"缺少客户签名信息": "顧客署名情報がありません",
|
||||
"插入签名失败": "署名の挿入に失敗しました",
|
||||
"缺少订单号": "注文番号がありません",
|
||||
"缺少订单信息": "注文情報がありません",
|
||||
"非当前用户订单信息不可操作": "他のユーザーの注文情報を操作できません",
|
||||
"订单已支付": "注文は支払われました",
|
||||
"您已购买过套餐,无法再次购买": "このバンドルはすでに購入済みであり、再度購入することはできません",
|
||||
"查询支付信息失败": "支払い情報のクエリに失敗しました",
|
||||
"下载文件失败": "ファイルのダウンロードに失敗しました",
|
||||
"上传文件失败": "ファイルのアップロードに失敗しました",
|
||||
"时间格式错误": "無効な時間形式",
|
||||
|
||||
"账号或密码错误": "アカウントまたはパスワードが間違っています",
|
||||
"账号或验证码错误": "アカウントまたは検証コードが間違っています",
|
||||
"账号已存在": "アカウントはすでに存在します",
|
||||
"没有找到数据": "データが見つかりません",
|
||||
"已经发送过,验证码尚可用": "送信されました。検証コードは引き続き有効です",
|
||||
"系统提示:已经发送过,验证码尚可用": "システムメッセージ:すでに送信され、検証コードは引き続き有効です",
|
||||
"您的手机号当天发送次数过多,请联系管理员通过密码登录": "その日の電話番号が送信されすぎています。管理者に連絡してパスワードでログインしてください",
|
||||
"您的手机号验证码错误,请确认之后注册": "電話番号の検証コードが間違っています。確認して登録してください",
|
||||
"手机号不合法": "電話番号が無効です",
|
||||
"手机号未更改": "電話番号が変更されていません",
|
||||
"新手机号过期": "新しい電話番号の有効期限が切れました",
|
||||
"验证码错误": "検証コードが間違っています",
|
||||
"验证码未发送": "検証コードが送信されていません",
|
||||
"账号不存在": "アカウントが存在しません",
|
||||
"已实名": "実名",
|
||||
"实名审核中,请勿重复提交": "実名審査中、繰り返し提出しないでください",
|
||||
"用户状态异常,无法进行审核": "ユーザーが異常であり、審査できません。手続き",
|
||||
"验证码已失效": "検証コードが無効です",
|
||||
"服务器错误": "サーバーエラー",
|
||||
"验证失败,请控制拼图对齐缺口": "検証に失敗しました。パズルの整列ギャップを制御してください",
|
||||
"滑块验证状态不存在,请退出重试": "スライダー検証状態が存在しません,リトライをログアウトしてください",
|
||||
}
|
||||
|
||||
var ZhTWMessages = map[string]string{
|
||||
"获取套餐列表失败": "獲取套餐列表失敗",
|
||||
"创建套餐信息失败": "創建套餐信息失敗",
|
||||
"创建套餐信息成功": "創建套餐信息成功",
|
||||
"更新套餐信息失败": "更新套餐信息失敗",
|
||||
"更新套餐信息成功": "更新套餐信息成功",
|
||||
"删除套餐信息失败": "刪除套餐信息失敗",
|
||||
"删除套餐信息成功": "刪除套餐信息成功",
|
||||
"获取套餐信息失败": "獲取套餐信息失敗",
|
||||
"创建订单信息失败": "創建訂單信息失敗",
|
||||
"创建订单信息成功": "創建訂單信息成功",
|
||||
"更新订单信息失败": "更新訂單信息失敗",
|
||||
"更新订单信息成功": "更新訂單信息成功",
|
||||
"获取订单信息失败": "獲取訂單信息失敗",
|
||||
"获取订单列表失败": "獲取訂單列表失敗",
|
||||
"缺少套餐UUID": "缺少套餐UUID",
|
||||
"缺少客户签名信息": "缺少客戶簽名信息",
|
||||
"插入签名失败": "插入簽名失敗",
|
||||
"缺少订单号": "缺少訂單號",
|
||||
"缺少订单信息": "缺少訂單信息",
|
||||
"非当前用户订单信息不可操作": "非當前用戶訂單信息不可操作",
|
||||
"订单已支付": "訂單已支付",
|
||||
"您已购买过套餐,无法再次购买": "您已購買過套餐,無法再次購買",
|
||||
"查询支付信息失败": "查詢支付信息失敗",
|
||||
"下载文件失败": "下載文件失敗",
|
||||
"上传文件失败": "上傳文件失敗",
|
||||
"时间格式错误": "時間格式錯誤",
|
||||
|
||||
"账号或密码错误": "帳號或密碼錯誤",
|
||||
"账号或验证码错误": "帳號或驗證碼錯誤",
|
||||
"账号已存在": "帳號已存在",
|
||||
"没有找到数据": "沒有找到數據",
|
||||
"已经发送过,验证码尚可用": "已經發送過,驗證碼尚可用",
|
||||
"系统提示:已经发送过,验证码尚可用": "系統提示:已經發送過,驗證碼尚可用",
|
||||
"您的手机号当天发送次数过多,请联系管理员通过密码登录": "您的手機號當天發送次數過多,請聯繫管理員通過密碼登錄",
|
||||
"您的手机号验证码错误,请确认之后注册": "您的手機號驗證碼錯誤,請確認之後註冊",
|
||||
"手机号不合法": "手機號不合法",
|
||||
"手机号未更改": "手機號未更改",
|
||||
"新手机号过期": "新手機號過期",
|
||||
"验证码错误": "驗證碼錯誤",
|
||||
"验证码未发送": "驗證碼未發送",
|
||||
"账号不存在": "帳號不存在",
|
||||
"已实名": "已實名",
|
||||
"实名审核中,请勿重复提交": "實名審核中,請勿重複提交",
|
||||
"用户状态异常,无法进行审核": "用戶狀態異常,無法進行審核",
|
||||
"验证码已失效": "驗證碼已失效",
|
||||
"服务器错误": "服務器錯誤",
|
||||
"验证失败,请控制拼图对齐缺口": "驗證失敗,請控制拼圖對齊缺口",
|
||||
"滑块验证状态不存在,请退出重试": "滑塊驗證狀態不存在,請退出重試",
|
||||
}
|
@ -100,8 +100,6 @@ var (
|
||||
|
||||
// 审批 es index
|
||||
ApprovalIndex string
|
||||
|
||||
Webhookkey string
|
||||
)
|
||||
|
||||
var ConfigData = new(AppConfig)
|
||||
@ -236,8 +234,6 @@ func LoadServer(file *ini.File) {
|
||||
|
||||
// 审批 es index
|
||||
ApprovalIndex = file.Section("es").Key("ApprovalIndex").String()
|
||||
|
||||
Webhookkey = file.Section("stripe").Key("Webhookkey").String()
|
||||
}
|
||||
|
||||
func Viper(iniConf string) (err error) {
|
||||
|
@ -29,8 +29,6 @@ const (
|
||||
Ok = 0
|
||||
BindError = 2
|
||||
JsonUnmarshal = 3
|
||||
ErrorHttp = 5
|
||||
ErrorBody = 6
|
||||
NotLogin = 401
|
||||
SUCCESS = 200
|
||||
UpdatePasswordSuccess = 201
|
||||
|
@ -46,8 +46,6 @@ var MsgFlags = map[int]string{
|
||||
InvalidParams: "请求参数错误",
|
||||
BindError: "参数绑定错误,类型不一致",
|
||||
JsonUnmarshal: "Json解析错误",
|
||||
ErrorHttp: "请求错误",
|
||||
ErrorBody: "响应错误",
|
||||
|
||||
ErrorExistNick: "已存在该昵称",
|
||||
ErrorExistUser: "已存在该用户名",
|
||||
|
@ -158,33 +158,3 @@ func (u *Upload) PutBos(filePath string, mediaType string, needRemove bool) (url
|
||||
url = fmt.Sprintf("%s/%s", config.ConfigData.Oss.CdnHost, objectName)
|
||||
return
|
||||
}
|
||||
|
||||
func MakeThumbnailDefault270(imagePath, savePath string) error {
|
||||
prefix := strings.ToLower(path.Ext("./2.jpg"))
|
||||
|
||||
file, _ := os.Open(imagePath)
|
||||
defer file.Close()
|
||||
img, _, err := image.Decode(file)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
img = rotate270(img)
|
||||
|
||||
newImg, _ := os.Create(savePath)
|
||||
defer newImg.Close()
|
||||
switch prefix {
|
||||
case ".jpg", ".jpeg":
|
||||
err = jpeg.Encode(newImg, img, &jpeg.Options{Quality: 100})
|
||||
case "png":
|
||||
err = png.Encode(newImg, img)
|
||||
case "bmp":
|
||||
err = bmp.Encode(newImg, img)
|
||||
default:
|
||||
err = jpeg.Encode(newImg, img, &jpeg.Options{Quality: 100})
|
||||
}
|
||||
if err != nil {
|
||||
logger.Error("Encode err", err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ func CheckLogin(provider *api.AccountClientImpl) gin.HandlerFunc {
|
||||
//如果没有登录
|
||||
authorization := ctx.GetHeader(e.BoxAuthorization)
|
||||
if authorization == "" {
|
||||
service.NotLoginError(ctx, errors.New(e.ErrNotLogin))
|
||||
service.Error(ctx, errors.New(e.ErrNotLogin))
|
||||
return
|
||||
}
|
||||
|
||||
@ -28,7 +28,7 @@ func CheckLogin(provider *api.AccountClientImpl) gin.HandlerFunc {
|
||||
fmt.Println(jwt)
|
||||
|
||||
if err != nil {
|
||||
service.NotLoginError(ctx, errors.New(e.ErrNotLogin))
|
||||
service.Error(ctx, errors.New(e.ErrNotLogin))
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1,16 +1,15 @@
|
||||
package model
|
||||
|
||||
const (
|
||||
HttpType = "http://"
|
||||
HttpsType = "https://"
|
||||
TmpArtworkDir = "./runtime/tmp/artworks"
|
||||
TmpArtistDir = "./runtime/tmp/artists"
|
||||
MediaPath = "./runtime/"
|
||||
TplPath = "./data/"
|
||||
ImgActionRotate = "rotate" //旋转
|
||||
ImgActionRotate270 = "rotate270" //旋转
|
||||
MediaTypeVideo = "video"
|
||||
MediaTypeImage = "video"
|
||||
HttpType = "http://"
|
||||
HttpsType = "https://"
|
||||
TmpArtworkDir = "./runtime/tmp/artworks"
|
||||
TmpArtistDir = "./runtime/tmp/artists"
|
||||
MediaPath = "./runtime/"
|
||||
TplPath = "./data/"
|
||||
ImgActionRotate = "rotate" //旋转
|
||||
MediaTypeVideo = "video"
|
||||
MediaTypeImage = "video"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -1,7 +0,0 @@
|
||||
package model
|
||||
|
||||
type UploadInfo struct {
|
||||
Url string
|
||||
Err string
|
||||
FileKName string
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"fonchain-fiee/pkg/service/bundle"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func BundleRouter(r *gin.RouterGroup) {
|
||||
bundleRoute := r.Group("bundle")
|
||||
|
||||
// 套餐
|
||||
{
|
||||
bundleClientRoute := bundleRoute.Group("system")
|
||||
{
|
||||
bundleClientRoute.POST("create", bundle.CreateBundle)
|
||||
bundleClientRoute.POST("update", bundle.UpdateBundle)
|
||||
bundleClientRoute.POST("remove", bundle.DeleteBundle)
|
||||
}
|
||||
|
||||
bundleAppRoute := bundleRoute.Group("common")
|
||||
{
|
||||
bundleAppRoute.POST("bundle-list", bundle.BundleList)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
package router
|
||||
|
||||
import (
|
||||
"fonchain-fiee/pkg/middleware"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/bundle"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func BundleOrderRouter(r *gin.RouterGroup) {
|
||||
|
||||
r.POST("/stripe-pay/callback", bundle.StripeCheckoutSessionWebhook)
|
||||
|
||||
bundleOrderRoute := r.Group("bundle-order")
|
||||
bundleOrderRoute.Use(middleware.CheckLogin(service.AccountProvider))
|
||||
|
||||
// 套餐
|
||||
{
|
||||
bundleOrderClientRoute := bundleOrderRoute.Group("common")
|
||||
{
|
||||
bundleOrderClientRoute.POST("bundle-order-list", bundle.OrderRecordsList)
|
||||
}
|
||||
|
||||
bundleOrderAppRoute := bundleOrderRoute.Group("app")
|
||||
{
|
||||
bundleOrderAppRoute.POST("order-signature", bundle.CreateBundleOrderSignature)
|
||||
bundleOrderAppRoute.POST("update-pay", bundle.UpdateBundleOrderStatusPaid)
|
||||
bundleOrderAppRoute.POST("order-detail", bundle.OrderRecordsDetail)
|
||||
|
||||
// stripe
|
||||
bundleOrderAppRoute.POST("create-stripe-pay", bundle.CreateStripeCheckoutSession)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -25,7 +25,7 @@ func NewRouter() *gin.Engine {
|
||||
r.Use(gzip.Gzip(gzip.BestSpeed)) // 中间件占用绝大部分内存
|
||||
//加入日志中间件,跨域中间件
|
||||
r.Use(middleware.NewLogger(), middleware.Cors(), middleware.GinRecovery(true))
|
||||
privateGroup := r.Group("api")
|
||||
privateGroup := r.Group("")
|
||||
privateGroup.Use(middleware.NewLogger(), middleware.Cors(), middleware.GinRecovery(true))
|
||||
//加入日志中间件,跨域中间件
|
||||
v1 := r.Group("api")
|
||||
@ -37,22 +37,19 @@ func NewRouter() *gin.Engine {
|
||||
return
|
||||
})
|
||||
|
||||
BundleRouter(privateGroup)
|
||||
BundleOrderRouter(privateGroup)
|
||||
|
||||
{
|
||||
v1.POST("version", version.Version) //版本号公共
|
||||
}
|
||||
//账号模块
|
||||
{
|
||||
privateGroup.POST("user/register", account.UserRegister) //h5注册登录
|
||||
privateGroup.POST("user/login", account.UserLogin) //后台登录
|
||||
privateGroup.POST("user/send", account.SendMsg) //发送验证码
|
||||
privateGroup.POST("user/logout", account.UserLogout) //登出
|
||||
privateGroup.POST("user/check/msg", account.CheckMsg) //校验验证码
|
||||
privateGroup.POST("generate/captcha", account.GenerateCaptcha) //生成滑块验证码
|
||||
privateGroup.POST("validate/captcha", account.ValidateCaptcha) //验证滑块验证码
|
||||
acRoute := privateGroup.Group("/user")
|
||||
r.POST("user/register", account.UserRegister) //h5注册登录
|
||||
r.POST("user/login", account.UserLogin) //后台登录
|
||||
r.POST("user/send", account.SendMsg) //发送验证码
|
||||
r.POST("user/logout", account.UserLogout) //登出
|
||||
r.POST("user/check/msg", account.CheckMsg) //校验验证码
|
||||
r.POST("generate/captcha", account.GenerateCaptcha) //生成滑块验证码
|
||||
r.POST("validate/captcha", account.ValidateCaptcha) //验证滑块验证码
|
||||
acRoute := r.Group("/user")
|
||||
acRoute.Use(middleware.CheckLogin(service.AccountProvider))
|
||||
{
|
||||
acRoute.POST("real-name", account.RealName) //实名
|
||||
@ -65,7 +62,7 @@ func NewRouter() *gin.Engine {
|
||||
}
|
||||
}
|
||||
// 上传
|
||||
upData := privateGroup.Group("upload")
|
||||
upData := r.Group("upload")
|
||||
upData.Use(middleware.CheckLogin(service.AccountProvider))
|
||||
{
|
||||
upData.POST("img", upload.UploadImg)
|
||||
@ -100,6 +97,16 @@ func NewRouter() *gin.Engine {
|
||||
redirectRoute.POST("sdk/down/v3", auth.DownImgV3)
|
||||
}
|
||||
|
||||
// 套餐
|
||||
{
|
||||
//bundleRoute := r.Group("bundle")
|
||||
|
||||
//bundleClientRoute := bundleRoute.Group("system")
|
||||
{
|
||||
//bundleClientRoute.POST("create", bundle.CreateBundle)
|
||||
}
|
||||
}
|
||||
|
||||
//静态文件
|
||||
r.StaticFS("/static", http.Dir("./runtime"))
|
||||
r.NoRoute(func(c *gin.Context) {
|
||||
|
@ -2,14 +2,18 @@ package account
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/account"
|
||||
"fonchain-fiee/pkg/cache"
|
||||
"fonchain-fiee/pkg/e"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/model/union"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gin-gonic/gin/binding"
|
||||
"github.com/go-redis/redis"
|
||||
"time"
|
||||
)
|
||||
|
||||
func UserApproval(c *gin.Context) {
|
||||
@ -88,10 +92,9 @@ func SendMsg(c *gin.Context) {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
data, err := service.AccountProvider.VerifySliderStatus(context.Background(), &account.VerifySliderStatusRequest{
|
||||
_, err := service.AccountProvider.VerifySliderStatus(context.Background(), &account.VerifySliderStatusRequest{
|
||||
NonceStr: req.NonceStr,
|
||||
})
|
||||
fmt.Println("data=============>", data, err)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
@ -101,46 +104,45 @@ func SendMsg(c *gin.Context) {
|
||||
if req.Zone != e.ZoneCn && req.Zone != "" {
|
||||
// ============================== redis检查ip开始
|
||||
ip := c.ClientIP()
|
||||
fmt.Println("当前ip:", ip, ";手机号:", req.TelNum, ";domain:", req.Domain)
|
||||
//daykey := "day_sms_limit:" + ip
|
||||
//minutekey := "minute_sms_limit:" + ip
|
||||
//duration := time.Second
|
||||
//isBlacklisted, blackErr := cache.RedisClient.SIsMember("nation_sms_blacklist", ip).Result()
|
||||
//if blackErr != nil {
|
||||
// service.Error(c, errors.New("Redis error"))
|
||||
// return
|
||||
//}
|
||||
//if isBlacklisted {
|
||||
// fmt.Println("当前ip手机号在黑名单中:", ip, ";手机号:", req.TelNum, ";domain:", req.Domain)
|
||||
// service.Success(c, "succes!!")
|
||||
// return
|
||||
//}
|
||||
//
|
||||
//// 一分钟5次,一天30次
|
||||
//if dayCount, redisErr := cache.RedisClient.Get(daykey).Int(); redisErr == redis.Nil {
|
||||
// cache.RedisClient.Set(daykey, 1, 24*time.Hour)
|
||||
//} else if redisErr != nil {
|
||||
// service.Error(c, errors.New("Redis error"))
|
||||
// return
|
||||
//} else if dayCount >= 30 {
|
||||
// cache.RedisClient.SAdd("nation_sms_blacklist", ip)
|
||||
// cache.RedisClient.Expire("nation_sms_blacklist", 24*time.Hour) // 黑名单记录有效期为24小时
|
||||
// fmt.Println("当前ip手机号在黑名单中:", ip, ";手机号:", req.TelNum, ";domain:", req.Domain)
|
||||
// service.Success(c, "succes!!")
|
||||
// return
|
||||
//}
|
||||
//if minuteCount, redisErr := cache.RedisClient.Get(minutekey).Int(); redisErr == redis.Nil {
|
||||
// cache.RedisClient.Set(minutekey, 1, duration)
|
||||
//} else if redisErr != nil {
|
||||
// service.Error(c, errors.New("Redis error"))
|
||||
// return
|
||||
//} else if minuteCount >= 5 {
|
||||
// fmt.Println("当前ip触发每分钟5次限制:", ip, ";手机号:", req.TelNum, ";domain:", req.Domain)
|
||||
// service.Success(c, "succes!!")
|
||||
// return
|
||||
//}
|
||||
//cache.RedisClient.Incr(daykey)
|
||||
//cache.RedisClient.Incr(minutekey)
|
||||
daykey := "day_sms_limit:" + ip
|
||||
minutekey := "minute_sms_limit:" + ip
|
||||
duration := time.Second
|
||||
isBlacklisted, blackErr := cache.RedisClient.SIsMember("nation_sms_blacklist", ip).Result()
|
||||
if blackErr != nil {
|
||||
service.Error(c, errors.New("Redis error"))
|
||||
return
|
||||
}
|
||||
if isBlacklisted {
|
||||
fmt.Println("当前ip手机号在黑名单中:", ip, ";手机号:", req.TelNum, ";domain:", req.Domain)
|
||||
service.Success(c, "succes!!")
|
||||
return
|
||||
}
|
||||
|
||||
// 一分钟5次,一天30次
|
||||
if dayCount, redisErr := cache.RedisClient.Get(daykey).Int(); redisErr == redis.Nil {
|
||||
cache.RedisClient.Set(daykey, 1, 24*time.Hour)
|
||||
} else if redisErr != nil {
|
||||
service.Error(c, errors.New("Redis error"))
|
||||
return
|
||||
} else if dayCount >= 30 {
|
||||
cache.RedisClient.SAdd("nation_sms_blacklist", ip)
|
||||
cache.RedisClient.Expire("nation_sms_blacklist", 24*time.Hour) // 黑名单记录有效期为24小时
|
||||
fmt.Println("当前ip手机号在黑名单中:", ip, ";手机号:", req.TelNum, ";domain:", req.Domain)
|
||||
service.Success(c, "succes!!")
|
||||
return
|
||||
}
|
||||
if minuteCount, redisErr := cache.RedisClient.Get(minutekey).Int(); redisErr == redis.Nil {
|
||||
cache.RedisClient.Set(minutekey, 1, duration)
|
||||
} else if redisErr != nil {
|
||||
service.Error(c, errors.New("Redis error"))
|
||||
return
|
||||
} else if minuteCount >= 5 {
|
||||
fmt.Println("当前ip触发每分钟5次限制:", ip, ";手机号:", req.TelNum, ";domain:", req.Domain)
|
||||
service.Success(c, "succes!!")
|
||||
return
|
||||
}
|
||||
cache.RedisClient.Incr(daykey)
|
||||
cache.RedisClient.Incr(minutekey)
|
||||
// ============================== redis检查ip结束
|
||||
|
||||
tempReq := &account.SendNationMsgRequest{
|
||||
|
@ -1,7 +1,6 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"fonchain-fiee/pkg/common"
|
||||
"github.com/gin-gonic/gin"
|
||||
"net/http"
|
||||
)
|
||||
@ -9,8 +8,6 @@ import (
|
||||
const (
|
||||
Failed = 1
|
||||
Ok = 0
|
||||
|
||||
RetryCode = 2
|
||||
)
|
||||
|
||||
// Response 基础序列化器
|
||||
@ -19,7 +16,6 @@ type Response struct {
|
||||
Data interface{} `json:"data"`
|
||||
Msg string `json:"msg"`
|
||||
Code int `json:"code"`
|
||||
Error error `json:"error"`
|
||||
}
|
||||
|
||||
// Success Success(c,someMap) datas传结构体中文会有乱码问题
|
||||
@ -42,45 +38,12 @@ func Success(c *gin.Context, datas ...interface{}) {
|
||||
// Error 统一错误返回
|
||||
func Error(c *gin.Context, err error) {
|
||||
|
||||
errMsg := ""
|
||||
if err != nil {
|
||||
errMsg = translateErrorMessage(c, err.Error())
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, Response{
|
||||
Code: Failed,
|
||||
Status: Failed,
|
||||
Msg: errMsg,
|
||||
Data: struct{}{},
|
||||
})
|
||||
|
||||
c.Abort()
|
||||
}
|
||||
|
||||
// 重试
|
||||
func Retry(c *gin.Context, err error) {
|
||||
errMsg := ""
|
||||
if err != nil {
|
||||
errMsg = err.Error()
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, Response{
|
||||
Code: RetryCode,
|
||||
Msg: errMsg,
|
||||
Data: struct{}{},
|
||||
})
|
||||
|
||||
c.Abort()
|
||||
}
|
||||
|
||||
func NotLoginError(c *gin.Context, err error) {
|
||||
|
||||
errMsg := ""
|
||||
if err != nil {
|
||||
errMsg = translateErrorMessage(c, err.Error())
|
||||
}
|
||||
|
||||
c.JSON(http.StatusUnauthorized, Response{
|
||||
Code: Failed,
|
||||
Msg: errMsg,
|
||||
Data: struct{}{},
|
||||
@ -88,19 +51,3 @@ func NotLoginError(c *gin.Context, err error) {
|
||||
|
||||
c.Abort()
|
||||
}
|
||||
|
||||
func translateErrorMessage(c *gin.Context, message string) string {
|
||||
lang := c.GetHeader("Accept-Language")
|
||||
switch lang {
|
||||
case "zh-CN":
|
||||
return message
|
||||
case "zh-TW":
|
||||
return common.ZhTWMessages[message]
|
||||
case "de-DE":
|
||||
return common.DeDEMessages[message]
|
||||
case "ja-JP":
|
||||
return common.JaJPMessages[message]
|
||||
default:
|
||||
return common.EnMessages[message]
|
||||
}
|
||||
}
|
||||
|
@ -1,242 +0,0 @@
|
||||
package bundle
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/api/order"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/bundle/common"
|
||||
"fonchain-fiee/pkg/service/bundle/logic"
|
||||
bundleModel "fonchain-fiee/pkg/service/bundle/model"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gin-gonic/gin/binding"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func CreateBundleOrderSignature(c *gin.Context) {
|
||||
var req bundle.OrderRecord
|
||||
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
if req.BundleUuid == "" {
|
||||
service.Error(c, errors.New(common.MissBundleUUID))
|
||||
return
|
||||
}
|
||||
|
||||
if req.Signature == "" {
|
||||
service.Error(c, errors.New(common.MissOrderSignature))
|
||||
return
|
||||
}
|
||||
|
||||
// 获取 用户信息
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
|
||||
// 校验 当前用户只能买一次套餐
|
||||
orderRecordsListReq := bundle.OrderRecordsRequest{
|
||||
CustomerID: strconv.FormatUint(userInfo.ID, 10),
|
||||
}
|
||||
orderRecordsList, orderRecordsListErr := service.BundleProvider.OrderRecordsList(context.Background(), &orderRecordsListReq)
|
||||
if orderRecordsListErr != nil {
|
||||
service.Error(c, orderRecordsListErr)
|
||||
return
|
||||
}
|
||||
|
||||
if orderRecordsList.OrderRecords != nil {
|
||||
for _, order := range orderRecordsList.OrderRecords {
|
||||
if order.CustomerID == strconv.FormatUint(userInfo.ID, 10) {
|
||||
service.Error(c, errors.New(common.HadOrder))
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 获取 最后一次的 合同编号
|
||||
lastOrderRecord, lastOrderRecordErr := service.BundleProvider.OrderRecordsList(context.Background(), &bundle.OrderRecordsRequest{
|
||||
PageSize: 1,
|
||||
Page: 1,
|
||||
})
|
||||
|
||||
if lastOrderRecordErr != nil {
|
||||
service.Error(c, lastOrderRecordErr)
|
||||
return
|
||||
}
|
||||
|
||||
lastContractNo := ""
|
||||
|
||||
if lastOrderRecord.OrderRecords != nil {
|
||||
for _, lastOrder := range lastOrderRecord.OrderRecords {
|
||||
lastContractNo = lastOrder.ContractNo
|
||||
}
|
||||
}
|
||||
|
||||
req.CustomerNum = userInfo.SubNum
|
||||
req.CustomerName = userInfo.Name
|
||||
req.CustomerID = strconv.FormatUint(userInfo.ID, 10)
|
||||
|
||||
// 获取 套餐信息
|
||||
bundleDetailReq := &bundle.BundleDetailRequest{
|
||||
Uuid: req.BundleUuid,
|
||||
}
|
||||
bundleDetail, detailErr := service.BundleProvider.BundleDetail(context.Background(), bundleDetailReq)
|
||||
if detailErr != nil {
|
||||
service.Error(c, detailErr)
|
||||
return
|
||||
}
|
||||
|
||||
req.BundleName = bundleDetail.Bundle.Name
|
||||
req.Amount = bundleDetail.Bundle.Price
|
||||
req.AmountType = bundleDetail.Bundle.PriceType
|
||||
|
||||
req.PayType = 1 // 默认 人民币
|
||||
|
||||
req.ContractNo = common.GenerateContractNo(lastContractNo)
|
||||
|
||||
// 当前 未将 签名 写入合同中
|
||||
signContract, signContractErr := logic.SignContract(req.CustomerNum, bundleDetail.Bundle.Contract, req.Signature, bundleDetail.Bundle.CompanySign, req.ContractNo, userInfo.Name, userInfo.SubscriberNumber, userInfo.TelNum, userInfo.PlaceOfResidence, bundleDetail.Bundle.Price, bundleDetail.Bundle.ContractDuration)
|
||||
if signContractErr != nil {
|
||||
service.Error(c, signContractErr)
|
||||
return
|
||||
}
|
||||
|
||||
req.SignContract = signContract
|
||||
|
||||
req.SignedTime = common.GetBeijingTime()
|
||||
|
||||
req.Status = bundleModel.OrderSigned
|
||||
|
||||
res, err := service.BundleProvider.CreateOrderRecord(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func UpdateBundleOrderStatusPaid(c *gin.Context) {
|
||||
var req bundle.OrderRecord
|
||||
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
// 获取 用户信息
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
|
||||
if req.Uuid == "" {
|
||||
service.Error(c, errors.New(common.MissOrderUUID))
|
||||
return
|
||||
}
|
||||
|
||||
detail, detailErr := service.BundleProvider.OrderRecordsDetail(context.Background(), &bundle.OrderRecordsDetailRequest{
|
||||
Uuid: req.Uuid,
|
||||
})
|
||||
|
||||
if detailErr != nil {
|
||||
service.Error(c, detailErr)
|
||||
return
|
||||
}
|
||||
|
||||
// 判断 是否是 本人操作
|
||||
if strconv.FormatUint(userInfo.ID, 10) != detail.OrderRecord.CustomerID {
|
||||
service.Error(c, errors.New(common.NotMatchOrderInfo))
|
||||
return
|
||||
}
|
||||
|
||||
// 如果 当前订单 是 已签未支付 且 存在 checkoutSessionId 需要 查询 支付结果
|
||||
if detail.OrderRecord.Status == bundleModel.OrderSigned && detail.OrderRecord.CheckoutSessionId != "" && detail.OrderRecord.PayTime == "" {
|
||||
// 查询支付结果
|
||||
stripeInfosRes, stripeInfosErr := service.OrderProvider.QueryStripeInfoByCheckSessionIds(context.Background(), &order.QueryStripeInfoRequest{
|
||||
CheckoutSessionIds: []string{detail.OrderRecord.CheckoutSessionId},
|
||||
})
|
||||
|
||||
if stripeInfosErr != nil {
|
||||
service.Error(c, errors.New(common.ErrorQueryStripeInfo))
|
||||
return
|
||||
}
|
||||
|
||||
totalStripe := 0
|
||||
|
||||
if stripeInfosRes != nil && len(stripeInfosRes.StripeInfos) > 0 {
|
||||
totalStripe = len(stripeInfosRes.StripeInfos)
|
||||
for _, stripeInfo := range stripeInfosRes.StripeInfos {
|
||||
if stripeInfo.OutTradeNo == detail.OrderRecord.OrderNo && stripeInfo.PaymentIntentStatus == "paid" {
|
||||
_, updateOrderRecordErr := service.BundleProvider.UpdateOrderRecord(context.Background(), &bundle.OrderRecord{
|
||||
Uuid: detail.OrderRecord.Uuid,
|
||||
Status: bundleModel.OrderPaid,
|
||||
PayTime: common.GetBeijingTime(),
|
||||
})
|
||||
if updateOrderRecordErr != nil {
|
||||
service.Error(c, detailErr)
|
||||
return
|
||||
}
|
||||
totalStripe--
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if totalStripe != 0 && totalStripe == len(stripeInfosRes.StripeInfos) {
|
||||
_, updateOrderRecordErr := service.BundleProvider.UpdateOrderRecord(context.Background(), &bundle.OrderRecord{
|
||||
Uuid: detail.OrderRecord.Uuid,
|
||||
CheckoutSessionId: "",
|
||||
CheckoutSessionUrl: "",
|
||||
})
|
||||
if updateOrderRecordErr != nil {
|
||||
service.Error(c, detailErr)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
service.Success(c, nil)
|
||||
}
|
||||
|
||||
func OrderRecordsList(c *gin.Context) {
|
||||
var req bundle.OrderRecordsRequest
|
||||
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
// 获取 用户信息
|
||||
//userInfo := login.GetUserInfoFromC(c)
|
||||
|
||||
//req.CustomerID = strconv.FormatUint(userInfo.ID, 10)
|
||||
|
||||
res, err := service.BundleProvider.OrderRecordsList(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func OrderRecordsDetail(c *gin.Context) {
|
||||
var req bundle.OrderRecordsDetailRequest
|
||||
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
// 获取 用户信息
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
|
||||
req.CustomerID = strconv.FormatUint(userInfo.ID, 10)
|
||||
|
||||
res, err := service.BundleProvider.OrderRecordsDetail(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, res)
|
||||
}
|
@ -1,78 +0,0 @@
|
||||
package bundle
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gin-gonic/gin/binding"
|
||||
)
|
||||
|
||||
func CreateBundle(c *gin.Context) {
|
||||
var req bundle.BundleProfile
|
||||
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
res, err := service.BundleProvider.CreateBundle(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func UpdateBundle(c *gin.Context) {
|
||||
var req bundle.BundleProfile
|
||||
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
res, err := service.BundleProvider.UpdateBundle(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, res)
|
||||
|
||||
}
|
||||
|
||||
func DeleteBundle(c *gin.Context) {
|
||||
var req bundle.DelBundleRequest
|
||||
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
res, err := service.BundleProvider.DeleteBundle(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, res)
|
||||
}
|
||||
|
||||
func BundleList(c *gin.Context) {
|
||||
var req bundle.BundleListRequest
|
||||
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
res, err := service.BundleProvider.BundleList(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, res)
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
// GenerateContractNo 生成 contractNo 规则 YYYY-MM-DD-xxxxx xxxxx 是从 00001 开始 自增
|
||||
func GenerateContractNo(lastContractNo string) string {
|
||||
prefix := time.Now().Format("2006-01-02") + "-"
|
||||
|
||||
if lastContractNo == "" {
|
||||
return prefix + "00001"
|
||||
}
|
||||
|
||||
suffix := lastContractNo[11:]
|
||||
|
||||
suffixInt, _ := strconv.ParseInt(suffix, 10, 64)
|
||||
|
||||
if suffixInt >= 99999 {
|
||||
suffixInt = suffixInt + 1
|
||||
return prefix + strconv.FormatInt(suffixInt, 10)
|
||||
} else {
|
||||
suffixInt = suffixInt + 1
|
||||
suffix = strconv.FormatInt(suffixInt, 10)
|
||||
suffix = fmt.Sprintf("%05d", suffixInt)
|
||||
return prefix + suffix
|
||||
}
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
package common
|
||||
|
||||
// 套餐
|
||||
const (
|
||||
MissBundleUUID = "缺少套餐UUID"
|
||||
MissOrderSignature = "缺少客户签名信息"
|
||||
ErrorInsertSignature = "插入签名失败"
|
||||
)
|
||||
|
||||
// 订单
|
||||
const (
|
||||
MissOrderNo = "缺少订单号"
|
||||
MissOrderUUID = "缺少订单信息"
|
||||
|
||||
NotMatchOrderInfo = "非当前用户订单信息不可操作"
|
||||
|
||||
HadPay = "订单已支付"
|
||||
|
||||
HadOrder = "您已购买过套餐,无法再次购买"
|
||||
)
|
||||
|
||||
// stripe
|
||||
const (
|
||||
ErrorQueryStripeInfo = "查询支付信息失败"
|
||||
)
|
||||
|
||||
const (
|
||||
ErrorDownloadFile = "下载文件失败"
|
||||
ErrorUploadFile = "上传文件失败"
|
||||
)
|
||||
|
||||
/*var EnMessages = map[string]string{
|
||||
"创建套餐信息失败": "Failed to create bundle information",
|
||||
"创建套餐信息成功": "Successfully created bundle information",
|
||||
"更新套餐信息失败": "Failed to update bundle information",
|
||||
"更新套餐信息成功": "Successfully updated bundle information",
|
||||
"删除套餐信息失败": "Failed to delete bundle information",
|
||||
"删除套餐信息成功": "Successfully deleted bundle information",
|
||||
"获取套餐列表失败": "Failed to get bundle list",
|
||||
"获取套餐信息失败": "Failed to get bundle information",
|
||||
"创建订单信息失败": "Failed to create order information",
|
||||
"创建订单信息成功": "Successfully created order information",
|
||||
"更新订单信息失败": "Failed to update order information",
|
||||
"更新订单信息成功": "Successfully updated order information",
|
||||
"获取订单信息失败": "Failed to get order information",
|
||||
"获取订单列表失败": "Failed to get order list",
|
||||
"缺少套餐UUID": "Missing bundle UUID",
|
||||
"缺少客户签名信息": "Missing customer signature",
|
||||
"插入签名失败": "Failed to insert signature",
|
||||
"缺少订单号": "Missing order number",
|
||||
"缺少订单信息": "Missing order information",
|
||||
"非当前用户订单信息不可操作": "Cannot operate on order information of other users",
|
||||
"订单已支付": "Order has been paid",
|
||||
"您已购买过套餐,无法再次购买": "You have already purchased this bundle and cannot purchase again",
|
||||
"查询支付信息失败": "Failed to query payment information",
|
||||
"下载文件失败": "Failed to download file",
|
||||
"上传文件失败": "Failed to upload file",
|
||||
"时间格式错误": "Invalid time format",
|
||||
}*/
|
@ -1,28 +0,0 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go.uber.org/zap"
|
||||
"time"
|
||||
)
|
||||
|
||||
// GetBeijingTime 获取当前时间的北京时间
|
||||
func GetBeijingTime() string {
|
||||
// 获取当前时间
|
||||
now := time.Now()
|
||||
|
||||
// 设置北京时间的时区
|
||||
beijing, err := time.LoadLocation("Asia/Shanghai")
|
||||
if err != nil {
|
||||
zap.L().Error("获取北京时间时区失败", zap.Error(err))
|
||||
return ""
|
||||
}
|
||||
|
||||
// 将当前时间转换为北京时间
|
||||
beijingTime := now.In(beijing).Format("2006-01-02 15:04:05")
|
||||
|
||||
// 打印北京时间
|
||||
fmt.Println("当前北京时间是:", beijingTime)
|
||||
|
||||
return beijingTime
|
||||
}
|
@ -1,320 +0,0 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"fonchain-fiee/pkg/model"
|
||||
"fonchain-fiee/pkg/service/bundle/common"
|
||||
"fonchain-fiee/pkg/service/upload"
|
||||
"github.com/signintech/gopdf"
|
||||
"go.uber.org/zap"
|
||||
"image"
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"strconv"
|
||||
"time"
|
||||
)
|
||||
|
||||
func SignContract(customerNum, contract, signImgPath, companyImgPath, contractNo, buyerName, idNo, telNum, address string, price float32, contractDuration int64) (outputUrl string, err error) {
|
||||
filePath := model.MediaPath + customerNum + time.Now().Format("20060102150405") + ".pdf"
|
||||
downloadFileErr := DownloadFile(filePath, contract)
|
||||
if downloadFileErr != nil {
|
||||
zap.L().Error("download file error: ", zap.Error(downloadFileErr))
|
||||
//service.Error(c, errors.New(common.ErrorDownloadFile))
|
||||
return outputUrl, errors.New(common.ErrorDownloadFile)
|
||||
}
|
||||
|
||||
signFile := model.MediaPath + customerNum + "signed" + time.Now().Format("20060102150405") + ".pdf"
|
||||
|
||||
/*signErr := InsertSignature(filePath, signFile, signImgPath, contractNo, idNo, telNum, address, price)
|
||||
if signErr != nil {
|
||||
zap.L().Error("insert signature error: ", zap.Error(signErr))
|
||||
return outputUrl, errors.New(common.ErrorInsertSignature)
|
||||
}*/
|
||||
|
||||
signErr := InsertSignatureV1(filePath, signFile, signImgPath, companyImgPath, contractNo, buyerName, idNo, telNum, address, price, contractDuration)
|
||||
if signErr != nil {
|
||||
zap.L().Error("insert signature error: ", zap.Error(signErr))
|
||||
return outputUrl, errors.New(common.ErrorInsertSignature)
|
||||
}
|
||||
|
||||
os.Remove(filePath)
|
||||
|
||||
outputUrl, ossErr := upload.PutBos(signFile, upload.PdfType, true)
|
||||
if ossErr != nil {
|
||||
return "", errors.New(common.ErrorUploadFile)
|
||||
}
|
||||
return outputUrl, nil
|
||||
}
|
||||
|
||||
// InsertSignature 把用户签字内容 填充到 合同模版里面
|
||||
func InsertSignature(templatePath string, outputPath string, signImgPath string) error {
|
||||
pdf := gopdf.GoPdf{}
|
||||
pdf.Start(gopdf.Config{PageSize: *gopdf.PageSizeA4})
|
||||
|
||||
resp, imageErr := http.Get(signImgPath)
|
||||
if imageErr != nil {
|
||||
return errors.New("error downloading signature image")
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
b, _err := io.ReadAll(resp.Body)
|
||||
if _err != nil {
|
||||
return errors.New("error reading signature image")
|
||||
}
|
||||
|
||||
// Create a new reader from the bytes
|
||||
imgReader := bytes.NewReader(b)
|
||||
img, _, err := image.DecodeConfig(imgReader)
|
||||
if err != nil {
|
||||
return errors.New("error decoding signature image")
|
||||
}
|
||||
w := img.Width
|
||||
h := img.Height
|
||||
|
||||
// 导入模板文件中的页面
|
||||
err = pdf.ImportPagesFromSource(templatePath, "/MediaBox")
|
||||
if err != nil {
|
||||
log.Fatalf("无法导入页面: %v", err)
|
||||
}
|
||||
|
||||
// 获取模板文件的总页数
|
||||
totalPages := pdf.GetNumberOfPages()
|
||||
fmt.Printf("模板文件的总页数: %d\n", totalPages)
|
||||
|
||||
targetPage := totalPages
|
||||
|
||||
// 遍历所有页
|
||||
for i := 1; i <= totalPages; i++ {
|
||||
tpl := pdf.ImportPage(templatePath, i, "/MediaBox")
|
||||
pdf.AddPage()
|
||||
pdf.UseImportedTemplate(tpl, 0, 0, gopdf.PageSizeA4.W, gopdf.PageSizeA4.H)
|
||||
// 只在目标页插入签名
|
||||
if i == targetPage {
|
||||
|
||||
imgH1, _err := gopdf.ImageHolderByBytes(b)
|
||||
if _err != nil {
|
||||
//zap.L().Error("SignContract err", zap.Error(err))
|
||||
return errors.New("error processing signature image")
|
||||
}
|
||||
newWidth := 80.0
|
||||
newHeight := (newWidth / float64(w)) * float64(h)
|
||||
err = pdf.ImageByHolder(imgH1, 380, 540, &gopdf.Rect{W: newWidth, H: newHeight})
|
||||
if err != nil {
|
||||
//zap.L().Error("SignContract err", zap.Error(err))
|
||||
return errors.New("error inserting signature")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 生成新的 PDF
|
||||
if err = pdf.WritePdf(outputPath); err != nil {
|
||||
//zap.L().Error("WritePdf err", zap.Error(err))
|
||||
return errors.New("error writing final PDF")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func InsertSignatureV1(templatePath, outputPath, signImgPath, companyImgPath, contractNo, buyerName, idNo, telNum, address string, price float32, contractDuration int64) error {
|
||||
pdf := gopdf.GoPdf{}
|
||||
pdf.Start(gopdf.Config{PageSize: *gopdf.PageSizeA4})
|
||||
|
||||
// 导入模板文件中的页面
|
||||
err := pdf.ImportPagesFromSource(templatePath, "/MediaBox")
|
||||
if err != nil {
|
||||
log.Fatalf("无法导入页面: %v", err)
|
||||
}
|
||||
|
||||
// 获取模板文件的总页数
|
||||
totalPages := pdf.GetNumberOfPages()
|
||||
fmt.Printf("模板文件的总页数: %d\n", totalPages)
|
||||
|
||||
buyerPage := 1
|
||||
|
||||
pricePage := 2
|
||||
|
||||
limitTimePage := 3
|
||||
|
||||
signPage := totalPages
|
||||
|
||||
tffErr := pdf.AddTTFFont("simfang", "./data/simfang.ttf")
|
||||
if tffErr != nil {
|
||||
fmt.Printf("加载中文字体失败: %v\n", tffErr)
|
||||
log.Fatalf("加载中文字体失败: %v", tffErr)
|
||||
}
|
||||
|
||||
// 设置字体和字号
|
||||
err = pdf.SetFont("simfang", "", 14)
|
||||
if err != nil {
|
||||
fmt.Printf("设置字体失败: %v\n", err)
|
||||
log.Fatalf("设置字体失败: %v", err)
|
||||
}
|
||||
|
||||
// 写 buyer info
|
||||
pdf.SetPage(buyerPage)
|
||||
pdf.SetX(149)
|
||||
pdf.SetY(126)
|
||||
pdf.Cell(nil, contractNo)
|
||||
|
||||
pdf.SetX(149)
|
||||
pdf.SetY(152)
|
||||
pdf.Cell(nil, time.Now().Format("2006-01-02"))
|
||||
|
||||
pdf.SetX(180)
|
||||
pdf.SetY(203)
|
||||
pdf.Cell(nil, buyerName)
|
||||
|
||||
pdf.SetX(210)
|
||||
pdf.SetY(229)
|
||||
pdf.Cell(nil, idNo)
|
||||
|
||||
pdf.SetX(200)
|
||||
pdf.SetY(256)
|
||||
pdf.Cell(nil, telNum)
|
||||
|
||||
pdf.SetX(200)
|
||||
pdf.SetY(282)
|
||||
pdf.Cell(nil, address)
|
||||
|
||||
// 填 金额
|
||||
pdf.SetPage(pricePage)
|
||||
pdf.SetX(380)
|
||||
pdf.SetY(626)
|
||||
// 保留整数
|
||||
//pdf.Cell(nil, strconv.FormatFloat(float64(price), 'f', 0, 32))
|
||||
pdf.Cell(nil, strconv.FormatFloat(float64(price/10000.0), 'f', -1, 32))
|
||||
|
||||
// 写 有效期
|
||||
t := time.Now().AddDate(int(contractDuration), 0, 0)
|
||||
pdf.SetPage(limitTimePage)
|
||||
pdf.SetX(317)
|
||||
pdf.SetY(327)
|
||||
pdf.Cell(nil, t.Format("2006"))
|
||||
|
||||
pdf.SetX(398)
|
||||
pdf.SetY(327)
|
||||
pdf.Cell(nil, t.Format("01"))
|
||||
|
||||
pdf.SetX(456)
|
||||
pdf.SetY(327)
|
||||
pdf.Cell(nil, t.Format("02"))
|
||||
|
||||
// 只在目标页插入签名
|
||||
pdf.SetPage(signPage)
|
||||
|
||||
signImgResp, imageErr := http.Get(signImgPath)
|
||||
if imageErr != nil {
|
||||
fmt.Printf("下载签名图片失败: %v\n", imageErr)
|
||||
return errors.New("error downloading signature image")
|
||||
}
|
||||
defer signImgResp.Body.Close()
|
||||
|
||||
signImgB, _err := io.ReadAll(signImgResp.Body)
|
||||
if _err != nil {
|
||||
fmt.Printf("读取签名图片失败: %v\n", _err)
|
||||
return errors.New("error reading signature image")
|
||||
}
|
||||
|
||||
// Create a new reader from the bytes
|
||||
signImgReader := bytes.NewReader(signImgB)
|
||||
signImg, _, err := image.DecodeConfig(signImgReader)
|
||||
if err != nil {
|
||||
fmt.Printf("解码签名图片失败: %v\n", err)
|
||||
return errors.New("error decoding signature image")
|
||||
}
|
||||
|
||||
signImgw := signImg.Width
|
||||
signImgh := signImg.Height
|
||||
|
||||
imgH1, _err := gopdf.ImageHolderByBytes(signImgB)
|
||||
if _err != nil {
|
||||
fmt.Printf("处理签名图片失败: %v\n", _err)
|
||||
return errors.New("error processing signature image")
|
||||
}
|
||||
newSignWidth := 80.0
|
||||
newSignHeight := (newSignWidth / float64(signImgw)) * float64(signImgh)
|
||||
|
||||
// buyer sign
|
||||
err = pdf.ImageByHolder(imgH1, 175, 530, &gopdf.Rect{W: newSignWidth, H: newSignHeight})
|
||||
if err != nil {
|
||||
fmt.Printf("插入签名失败: %v\n", err)
|
||||
return errors.New("error inserting signature")
|
||||
}
|
||||
|
||||
pdf.SetX(365)
|
||||
pdf.SetY(560)
|
||||
pdf.Cell(nil, time.Now().Format("2006-01-02"))
|
||||
|
||||
companyImgResp, companyImageErr := http.Get(companyImgPath)
|
||||
if companyImageErr != nil {
|
||||
fmt.Printf("下载公司章图片: %v\n", companyImgPath)
|
||||
fmt.Printf("下载公司章图片失败: %v\n", companyImageErr)
|
||||
return errors.New("error downloading signature image")
|
||||
}
|
||||
defer companyImgResp.Body.Close()
|
||||
|
||||
companyImgB, _err := io.ReadAll(companyImgResp.Body)
|
||||
if _err != nil {
|
||||
fmt.Printf("读取公司章图片失败: %v\n", _err)
|
||||
return errors.New("error reading signature image")
|
||||
}
|
||||
|
||||
// Create a new reader from the bytes
|
||||
companyImgReader := bytes.NewReader(companyImgB)
|
||||
companyImg, _, err := image.DecodeConfig(companyImgReader)
|
||||
if err != nil {
|
||||
fmt.Printf("解码公司章图片失败: %v\n", err)
|
||||
return errors.New("error decoding signature image")
|
||||
}
|
||||
|
||||
companyImgw := companyImg.Width
|
||||
companyImgh := companyImg.Height
|
||||
|
||||
companyImgH1, _err := gopdf.ImageHolderByBytes(companyImgB)
|
||||
if _err != nil {
|
||||
fmt.Printf("处理公司章图片失败: %v\n", _err)
|
||||
return errors.New("error processing signature image")
|
||||
}
|
||||
newCompanyWidth := 80.0
|
||||
newCompanyHeight := (newCompanyWidth / float64(companyImgw)) * float64(companyImgh)
|
||||
|
||||
// seller sign
|
||||
err = pdf.ImageByHolder(companyImgH1, 175, 590, &gopdf.Rect{W: newCompanyWidth, H: newCompanyHeight})
|
||||
if err != nil {
|
||||
fmt.Printf("插入公司章失败: %v\n", err)
|
||||
return errors.New("error inserting signature")
|
||||
}
|
||||
|
||||
pdf.SetX(365)
|
||||
pdf.SetY(607)
|
||||
pdf.Cell(nil, time.Now().Format("2006-01-02"))
|
||||
|
||||
// 生成新的 PDF
|
||||
if err = pdf.WritePdf(outputPath); err != nil {
|
||||
fmt.Printf("写入 PDF 失败: %v\n", err)
|
||||
return errors.New("error writing final PDF")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func DownloadFile(filepath string, url string) error {
|
||||
resp, err := http.Get(url)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
out, err := os.Create(filepath)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer out.Close()
|
||||
|
||||
_, err = io.Copy(out, resp.Body)
|
||||
return err
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
package model
|
||||
|
||||
const (
|
||||
OrderSigned = 1
|
||||
OrderPaid = 2
|
||||
)
|
@ -1,138 +0,0 @@
|
||||
package bundle
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/api/order"
|
||||
"fonchain-fiee/pkg/config"
|
||||
"fonchain-fiee/pkg/model/login"
|
||||
"fonchain-fiee/pkg/service"
|
||||
"fonchain-fiee/pkg/service/bundle/common"
|
||||
bundleModel "fonchain-fiee/pkg/service/bundle/model"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gin-gonic/gin/binding"
|
||||
"io"
|
||||
"net/http"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func CreateStripeCheckoutSession(c *gin.Context) {
|
||||
var req order.CreateStripeCheckoutSessionRequest
|
||||
|
||||
if err := c.ShouldBindBodyWith(&req, binding.JSON); err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
// 获取 用户信息
|
||||
userInfo := login.GetUserInfoFromC(c)
|
||||
|
||||
// 检查 订单信息
|
||||
detail, detailErr := service.BundleProvider.OrderRecordsDetail(context.Background(), &bundle.OrderRecordsDetailRequest{
|
||||
OrderNo: req.OutTradeNo,
|
||||
})
|
||||
|
||||
if detailErr != nil {
|
||||
service.Error(c, detailErr)
|
||||
return
|
||||
}
|
||||
|
||||
// 判断 是否是 本人操作
|
||||
if strconv.FormatUint(userInfo.ID, 10) != detail.OrderRecord.CustomerID {
|
||||
service.Error(c, errors.New(common.NotMatchOrderInfo))
|
||||
return
|
||||
}
|
||||
|
||||
// 如果 当前订单 是 已签未支付 且 存在 checkoutSessionId 需要 查询 支付结果
|
||||
if detail.OrderRecord.Status == bundleModel.OrderSigned && detail.OrderRecord.CheckoutSessionId != "" && detail.OrderRecord.PayTime == "" {
|
||||
// 查询支付结果
|
||||
stripeInfosRes, stripeInfosErr := service.OrderProvider.QueryStripeInfoByCheckSessionIds(context.Background(), &order.QueryStripeInfoRequest{
|
||||
CheckoutSessionIds: []string{detail.OrderRecord.CheckoutSessionId},
|
||||
})
|
||||
|
||||
if stripeInfosErr != nil {
|
||||
service.Error(c, errors.New(common.ErrorQueryStripeInfo))
|
||||
return
|
||||
}
|
||||
|
||||
if stripeInfosRes != nil && len(stripeInfosRes.StripeInfos) > 0 {
|
||||
for _, stripeInfo := range stripeInfosRes.StripeInfos {
|
||||
if stripeInfo.OutTradeNo == detail.OrderRecord.OrderNo && stripeInfo.PaymentIntentStatus == "paid" {
|
||||
_, updateOrderRecordErr := service.BundleProvider.UpdateOrderRecord(context.Background(), &bundle.OrderRecord{
|
||||
Uuid: detail.OrderRecord.Uuid,
|
||||
Status: bundleModel.OrderPaid,
|
||||
PayTime: common.GetBeijingTime(),
|
||||
})
|
||||
fmt.Println("detail.OrderRecord.Uuid :", detail.OrderRecord.Uuid)
|
||||
if updateOrderRecordErr != nil {
|
||||
service.Error(c, detailErr)
|
||||
return
|
||||
}
|
||||
service.Success(c, &service.Response{
|
||||
Msg: common.HadPay,
|
||||
Code: 0,
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//调用微服务获取支付地址
|
||||
result, err := service.OrderProvider.CreateStripeCheckoutSession(context.Background(), &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
//更新订单状态
|
||||
_, updateOrderRecordErr := service.BundleProvider.UpdateOrderRecord(context.Background(), &bundle.OrderRecord{
|
||||
Uuid: detail.OrderRecord.Uuid,
|
||||
CheckoutSessionId: result.CheckoutSessionId,
|
||||
CheckoutSessionUrl: result.CheckoutSessionUrl,
|
||||
})
|
||||
|
||||
if updateOrderRecordErr != nil {
|
||||
service.Error(c, updateOrderRecordErr)
|
||||
return
|
||||
}
|
||||
|
||||
service.Success(c, result)
|
||||
|
||||
}
|
||||
|
||||
func StripeCheckoutSessionWebhook(c *gin.Context) {
|
||||
var req order.GetCheckoutWebhookRequest
|
||||
c.Request.Body = http.MaxBytesReader(c.Writer, c.Request.Body, int64(65536))
|
||||
payloadBytes, err := io.ReadAll(c.Request.Body)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
req.Payload = string(payloadBytes)
|
||||
req.Signature = c.GetHeader("Stripe-Signature")
|
||||
req.WebhookKey = config.Webhookkey
|
||||
fmt.Printf("webhookKey:%s\n", req.WebhookKey)
|
||||
resp, err := service.OrderProvider.CommonCheckoutWebhook(c, &req)
|
||||
if err != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
fmt.Println("resp.PaymentIntentStatus:", resp.PaymentIntentStatus)
|
||||
if resp.PaymentIntentStatus == "paid" {
|
||||
//支付成功
|
||||
_, updateStatusErr := service.BundleProvider.UpdateOrderRecordByOrderNo(context.Background(), &bundle.OrderRecord{
|
||||
OrderNo: resp.OutTradeNo,
|
||||
PayTime: common.GetBeijingTime(),
|
||||
Status: bundleModel.OrderPaid,
|
||||
})
|
||||
if updateStatusErr != nil {
|
||||
service.Error(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
}
|
||||
service.Success(c)
|
||||
}
|
@ -7,7 +7,6 @@ import (
|
||||
"fmt"
|
||||
"fonchain-fiee/api/account"
|
||||
"fonchain-fiee/api/bundle"
|
||||
"fonchain-fiee/api/order"
|
||||
pkConfig "fonchain-fiee/pkg/config"
|
||||
"os"
|
||||
)
|
||||
@ -15,12 +14,10 @@ import (
|
||||
var AccountProvider = new(account.AccountClientImpl)
|
||||
|
||||
var BundleProvider = new(bundle.BundleClientImpl)
|
||||
var OrderProvider = new(order.OrderClientImpl)
|
||||
|
||||
func init() {
|
||||
config.SetConsumerService(BundleProvider)
|
||||
config.SetConsumerService(OrderProvider)
|
||||
config.SetConsumerService(AccountProvider)
|
||||
//config.SetConsumerService(BundleProvider)
|
||||
|
||||
if err := config.Load(); err != nil {
|
||||
panic(err)
|
||||
|
@ -36,7 +36,6 @@ const (
|
||||
VideoType = "video"
|
||||
ImageType = "image"
|
||||
PngType = "png"
|
||||
PdfType = "pdf"
|
||||
ArtworkFilePath = "artwork"
|
||||
ArtworkChunkBasePath = "./runtime/tmp/artworks"
|
||||
)
|
||||
@ -135,15 +134,6 @@ func UploadImg(c *gin.Context) {
|
||||
_ = os.Remove(dst)
|
||||
dst = newDst
|
||||
}
|
||||
} else if action == model.ImgActionRotate270 {
|
||||
fileFullName = fmt.Sprintf("%s%s", filename, fileExt)
|
||||
newDst := fmt.Sprintf("%s/%s_rotate%v", imgPath, filename, fileExt)
|
||||
if err = logic.MakeThumbnailDefault270(dst, newDst); err != nil {
|
||||
fmt.Printf("MakeThumbnailDefault90 err %+v\n", err)
|
||||
} else {
|
||||
_ = os.Remove(dst)
|
||||
dst = newDst
|
||||
}
|
||||
}
|
||||
//localUrl := fmt.Sprintf("%s/%s/%s/%s/%s", config.ServerDM, BaseRoute, source, mask, fileFullName)
|
||||
var data map[string]string = make(map[string]string, 2)
|
||||
@ -288,7 +278,7 @@ func PutBos(filePath string, mediaType string, needRemove bool) (url string, err
|
||||
return
|
||||
}
|
||||
}
|
||||
filePath = strings.Replace(filePath, model.MediaPath, "", 1)
|
||||
filePath = strings.Replace(filePath, "./runtime", "", 1)
|
||||
var objectName string = fmt.Sprintf("%s/%s%s", config.ConfigData.Oss.BaseDir, config.Env, filePath)
|
||||
_, err = BOSClient.PutObjectFromBytes(config.ConfigData.Oss.BucketName, objectName, fileBytes)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user