This commit is contained in:
蒋海成 2025-02-23 20:56:42 +08:00
parent 77c80c6042
commit e3bb596d92
3 changed files with 19 additions and 4 deletions

View File

@ -157,6 +157,10 @@ func OrderRecordDetail(req *bundle.OrderRecordsDetailRequest) (res *bundle.Order
query = query.Where("order_no = ?", req.OrderNo) query = query.Where("order_no = ?", req.OrderNo)
} }
if req.CustomerID != "" {
query = query.Where("customer_id = ?", req.CustomerID)
}
err = query.First(&orderRecord).Error err = query.First(&orderRecord).Error
if err != nil { if err != nil {
return res, commonErr.ReturnError(err, msg.ErrorGetOrderInfo, "获取订单信息失败: ") return res, commonErr.ReturnError(err, msg.ErrorGetOrderInfo, "获取订单信息失败: ")

View File

@ -107,6 +107,7 @@ message OrderRecordsResponse {
message OrderRecordsDetailRequest { message OrderRecordsDetailRequest {
string uuid = 1 [json_name = "uuid"]; string uuid = 1 [json_name = "uuid"];
string orderNo = 2 [json_name = "orderNo"]; string orderNo = 2 [json_name = "orderNo"];
string customerID = 3 [json_name = "customerID"];
} }
message OrderRecordsDetailResponse { message OrderRecordsDetailResponse {

View File

@ -855,8 +855,9 @@ type OrderRecordsDetailRequest struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
OrderNo string `protobuf:"bytes,2,opt,name=orderNo,proto3" json:"orderNo,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"`
} }
func (x *OrderRecordsDetailRequest) Reset() { func (x *OrderRecordsDetailRequest) Reset() {
@ -905,6 +906,13 @@ func (x *OrderRecordsDetailRequest) GetOrderNo() string {
return "" return ""
} }
func (x *OrderRecordsDetailRequest) GetCustomerID() string {
if x != nil {
return x.CustomerID
}
return ""
}
type OrderRecordsDetailResponse struct { type OrderRecordsDetailResponse struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@ -1079,11 +1087,13 @@ var file_pb_bundle_proto_rawDesc = []byte{
0x64, 0x6c, 0x65, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x52, 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, 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, 0x05, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x74, 0x6f,
0x74, 0x61, 0x6c, 0x22, 0x49, 0x0a, 0x19, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 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, 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, 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, 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, 0x22, 0x65, 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, 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, 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, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,