Compare commits
No commits in common. "4cdb1508a8d91c1668ce213b03fae3a451ceac20" and "1886eadf91715002a7bd19b062d631116014159c" have entirely different histories.
4cdb1508a8
...
1886eadf91
@ -34,7 +34,7 @@ func (b *BundleProvider) BundleDetail(_ context.Context, req *bundle.BundleDetai
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 订单相关
|
// 订单相关
|
||||||
func (b *BundleProvider) CreateOrderRecord(_ context.Context, req *bundle.OrderCreateRecord) (res *bundle.CommonResponse, err error) {
|
func (b *BundleProvider) CreateOrderRecord(_ context.Context, req *bundle.OrderRecord) (res *bundle.CommonResponse, err error) {
|
||||||
return logic.CreateOrderRecord(req)
|
return logic.CreateOrderRecord(req)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package dao
|
package dao
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
"gorm.io/gorm"
|
||||||
"micro-bundle/internal/model"
|
"micro-bundle/internal/model"
|
||||||
"micro-bundle/pb/bundle"
|
"micro-bundle/pb/bundle"
|
||||||
"micro-bundle/pkg/app"
|
"micro-bundle/pkg/app"
|
||||||
@ -11,112 +13,108 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func CreateOrderRecord(orderRecord *model.BundleOrderRecords) (res *bundle.CommonResponse, err error) {
|
func CreateOrderRecord(orderRecord *model.BundleOrderRecords, req *bundle.OrderRecord) (res *bundle.CommonResponse, err error) {
|
||||||
res = new(bundle.CommonResponse)
|
res = new(bundle.CommonResponse)
|
||||||
//bundleInfo := new(model.BundleProfile)
|
bundleInfo := new(model.BundleProfile)
|
||||||
//// 生成UUID和订单号
|
// 生成UUID和订单号
|
||||||
//orderRecord.UUID = app.ModuleClients.SfNode.Generate().Base64()
|
orderRecord.UUID = app.ModuleClients.SfNode.Generate().Base64()
|
||||||
//orderRecord.OrderNo = utils.GetOrderNo()
|
orderRecord.OrderNo = utils.GetOrderNo()
|
||||||
err = app.ModuleClients.BundleDB.Model(&model.BundleOrderRecords{}).Create(orderRecord).Error
|
|
||||||
|
// 开启事务
|
||||||
|
tx := app.ModuleClients.BundleDB.Begin()
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
tx.Rollback()
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
|
// 查询套餐主表并预加载
|
||||||
|
err = tx.Model(&model.BundleProfile{}).
|
||||||
|
Where("uuid = ?", orderRecord.BundleUUID).
|
||||||
|
Preload("BundleToValueAddService").
|
||||||
|
Preload("BundleProfileLang", "language = ?", req.Language).
|
||||||
|
First(&bundleInfo).Error
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
tx.Rollback()
|
||||||
|
res.Msg = msg.ErrorBundleNotFound
|
||||||
|
return res, commonErr.ReturnError(err, msg.ErrorBundleNotFound, "查询Bundle信息失败: ")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 填充BundleCommonJson字段
|
||||||
|
if bundleJson, e := json.Marshal(bundleInfo); e == nil {
|
||||||
|
orderRecord.BundleCommonJson = bundleJson
|
||||||
|
} else {
|
||||||
|
tx.Rollback()
|
||||||
|
res.Msg = msg.ErrorDataConvert
|
||||||
|
return res, commonErr.ReturnError(e, msg.ErrorDataConvert, "Bundle信息转换失败: ")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建主订单
|
||||||
|
if err = tx.Model(&model.BundleOrderRecords{}).Create(orderRecord).Error; err != nil {
|
||||||
|
tx.Rollback()
|
||||||
res.Msg = msg.ErrorCreateOrderInfo
|
res.Msg = msg.ErrorCreateOrderInfo
|
||||||
return res, commonErr.ReturnError(err, msg.ErrorCreateOrderInfo, "创建订单信息失败: ")
|
return res, commonErr.ReturnError(err, msg.ErrorCreateOrderInfo, "创建订单信息失败: ")
|
||||||
}
|
}
|
||||||
//// 开启事务
|
var (
|
||||||
//tx := app.ModuleClients.BundleDB.Begin()
|
childOrders []*model.BundleOrderValueAdd
|
||||||
//defer func() {
|
valueAddAmount float64
|
||||||
// if r := recover(); r != nil {
|
expirationTime = "9999-12-31"
|
||||||
// tx.Rollback()
|
)
|
||||||
// }
|
for _, service := range bundleInfo.BundleToValueAddService {
|
||||||
//}()
|
amount, info, num, day, e := calculateAmount(service.ValueUid, req)
|
||||||
//
|
if e != nil {
|
||||||
//// 查询套餐主表并预加载
|
tx.Rollback()
|
||||||
//err = tx.Model(&model.BundleProfile{}).
|
res.Msg = msg.ErrorDataConvert
|
||||||
// Where("uuid = ?", orderRecord.BundleUUID).
|
return res, commonErr.ReturnError(e, msg.ErrorDataConvert, "子订单金额计算失败: ")
|
||||||
// Preload("BundleToValueAddService").
|
}
|
||||||
// Preload("BundleProfileLang", "language = ?", req.Language).
|
if day != "" {
|
||||||
// First(&bundleInfo).Error
|
expirationTime = day
|
||||||
//if err != nil {
|
}
|
||||||
// tx.Rollback()
|
valueAddAmount = valueAddAmount + amount
|
||||||
// res.Msg = msg.ErrorBundleNotFound
|
childOrder := &model.BundleOrderValueAdd{
|
||||||
// return res, commonErr.ReturnError(err, msg.ErrorBundleNotFound, "查询Bundle信息失败: ")
|
UUID: app.ModuleClients.SfNode.Generate().Base64(),
|
||||||
//}
|
OrderUUID: orderRecord.UUID, // 修正: 这里应使用主订单UUID
|
||||||
//
|
CustomerID: orderRecord.CustomerID,
|
||||||
//// 填充BundleCommonJson字段
|
CustomerNum: orderRecord.CustomerNum,
|
||||||
//if bundleJson, e := json.Marshal(bundleInfo); e == nil {
|
CustomerName: orderRecord.CustomerName,
|
||||||
// orderRecord.BundleCommonJson = bundleJson
|
ServiceType: info.ServiceType,
|
||||||
//} else {
|
CurrencyType: info.PriceType,
|
||||||
// tx.Rollback()
|
Amount: amount,
|
||||||
// res.Msg = msg.ErrorDataConvert
|
OrderNo: orderRecord.OrderNo,
|
||||||
// return res, commonErr.ReturnError(e, msg.ErrorDataConvert, "Bundle信息转换失败: ")
|
Num: num,
|
||||||
//}
|
Unit: info.Unit,
|
||||||
//
|
ValueAddUUID: service.ValueUid,
|
||||||
//// 创建主订单
|
Source: 1,
|
||||||
//if err = tx.Model(&model.BundleOrderRecords{}).Create(orderRecord).Error; err != nil {
|
PaymentStatus: 1,
|
||||||
// tx.Rollback()
|
SignContract: orderRecord.SignContract,
|
||||||
// res.Msg = msg.ErrorCreateOrderInfo
|
Signature: orderRecord.Signature,
|
||||||
// return res, commonErr.ReturnError(err, msg.ErrorCreateOrderInfo, "创建订单信息失败: ")
|
SignedTime: orderRecord.SignedTime,
|
||||||
//}
|
Snapshot: req.Snapshot,
|
||||||
//var (
|
}
|
||||||
// childOrders []*model.BundleOrderValueAdd
|
childOrders = append(childOrders, childOrder)
|
||||||
// valueAddAmount float64
|
}
|
||||||
// expirationTime = "9999-12-31"
|
// 批量创建子订单(提高性能)
|
||||||
//)
|
if err = tx.Model(&model.BundleOrderValueAdd{}).Create(childOrders).Error; err != nil {
|
||||||
//for _, service := range bundleInfo.BundleToValueAddService {
|
tx.Rollback()
|
||||||
// amount, info, num, day, e := calculateAmount(service.ValueUid, req)
|
return res, commonErr.ReturnError(err, msg.ErrorCreateOrderInfo, "批量创建子订单失败")
|
||||||
// if e != nil {
|
}
|
||||||
// tx.Rollback()
|
// 更新总金额
|
||||||
// res.Msg = msg.ErrorDataConvert
|
updateData := map[string]interface{}{
|
||||||
// return res, commonErr.ReturnError(e, msg.ErrorDataConvert, "子订单金额计算失败: ")
|
"total_amount": gorm.Expr("total_amount + ?", valueAddAmount),
|
||||||
// }
|
"updated_at": time.Now(),
|
||||||
// if day != "" {
|
"expiration_time": expirationTime,
|
||||||
// expirationTime = day
|
}
|
||||||
// }
|
if err = tx.Model(&model.BundleOrderRecords{}).
|
||||||
// valueAddAmount = valueAddAmount + amount
|
Where("uuid = ?", orderRecord.UUID).
|
||||||
// childOrder := &model.BundleOrderValueAdd{
|
Updates(updateData).Error; err != nil {
|
||||||
// UUID: app.ModuleClients.SfNode.Generate().Base64(),
|
tx.Rollback()
|
||||||
// OrderUUID: orderRecord.UUID, // 修正: 这里应使用主订单UUID
|
return res, commonErr.ReturnError(err, msg.ErrorUpdateOrderInfo, "更新订单总金额失败")
|
||||||
// CustomerID: orderRecord.CustomerID,
|
}
|
||||||
// CustomerNum: orderRecord.CustomerNum,
|
// 提交事务
|
||||||
// CustomerName: orderRecord.CustomerName,
|
if err = tx.Commit().Error; err != nil {
|
||||||
// ServiceType: info.ServiceType,
|
res.Msg = msg.ErrorCommitTransaction
|
||||||
// CurrencyType: info.PriceType,
|
return res, commonErr.ReturnError(err, msg.ErrorCommitTransaction, "提交事务失败: ")
|
||||||
// Amount: amount,
|
}
|
||||||
// OrderNo: orderRecord.OrderNo,
|
|
||||||
// Num: num,
|
|
||||||
// Unit: info.Unit,
|
|
||||||
// ValueAddUUID: service.ValueUid,
|
|
||||||
// Source: 1,
|
|
||||||
// PaymentStatus: 1,
|
|
||||||
// SignContract: orderRecord.SignContract,
|
|
||||||
// Signature: orderRecord.Signature,
|
|
||||||
// SignedTime: orderRecord.SignedTime,
|
|
||||||
// Snapshot: req.Snapshot,
|
|
||||||
// }
|
|
||||||
// childOrders = append(childOrders, childOrder)
|
|
||||||
//}
|
|
||||||
//// 批量创建子订单(提高性能)
|
|
||||||
//if err = tx.Model(&model.BundleOrderValueAdd{}).Create(childOrders).Error; err != nil {
|
|
||||||
// tx.Rollback()
|
|
||||||
// return res, commonErr.ReturnError(err, msg.ErrorCreateOrderInfo, "批量创建子订单失败")
|
|
||||||
//}
|
|
||||||
//// 更新总金额
|
|
||||||
//updateData := map[string]interface{}{
|
|
||||||
// "total_amount": gorm.Expr("total_amount + ?", valueAddAmount),
|
|
||||||
// "updated_at": time.Now(),
|
|
||||||
// "expiration_time": expirationTime,
|
|
||||||
//}
|
|
||||||
//if err = tx.Model(&model.BundleOrderRecords{}).
|
|
||||||
// Where("uuid = ?", orderRecord.UUID).
|
|
||||||
// Updates(updateData).Error; err != nil {
|
|
||||||
// tx.Rollback()
|
|
||||||
// return res, commonErr.ReturnError(err, msg.ErrorUpdateOrderInfo, "更新订单总金额失败")
|
|
||||||
//}
|
|
||||||
//// 提交事务
|
|
||||||
//if err = tx.Commit().Error; err != nil {
|
|
||||||
// res.Msg = msg.ErrorCommitTransaction
|
|
||||||
// return res, commonErr.ReturnError(err, msg.ErrorCommitTransaction, "提交事务失败: ")
|
|
||||||
//}
|
|
||||||
|
|
||||||
res.Uuid = orderRecord.UUID
|
res.Uuid = orderRecord.UUID
|
||||||
res.OrderNo = orderRecord.OrderNo
|
res.OrderNo = orderRecord.OrderNo
|
||||||
|
@ -9,58 +9,17 @@ import (
|
|||||||
"micro-bundle/pkg/utils"
|
"micro-bundle/pkg/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func CreateOrderRecord(req *bundle.OrderCreateRecord) (res *bundle.CommonResponse, err error) {
|
func CreateOrderRecord(req *bundle.OrderRecord) (res *bundle.CommonResponse, err error) {
|
||||||
res = new(bundle.CommonResponse)
|
res = new(bundle.CommonResponse)
|
||||||
orderUUID := app.ModuleClients.SfNode.Generate().Base64()
|
orderRecord := new(model.BundleOrderRecords)
|
||||||
orderNo := utils.GetOrderNo()
|
_ = copier.CopyWithOption(&orderRecord, req, copier.Option{DeepCopy: true})
|
||||||
var addRecords []model.BundleOrderValueAdd
|
orderRecord.UUID = app.ModuleClients.SfNode.Generate().Base64()
|
||||||
for _, i := range req.AddRecords {
|
orderRecord.OrderNo = utils.GetOrderNo()
|
||||||
addRecords = append(addRecords, model.BundleOrderValueAdd{
|
orderRecord.BundleUUID = req.BundleUuid
|
||||||
UUID: app.ModuleClients.SfNode.Generate().Base64(),
|
orderRecord.ValueAddBundleUUID = req.ValueAddBundleUuid
|
||||||
OrderNo: orderNo,
|
orderRecord.FinancialConfirmation = model.ConfirmationNotConfirmed
|
||||||
OrderUUID: orderUUID,
|
orderRecord.Language = req.Language
|
||||||
CustomerID: req.CustomerID,
|
res, err = dao.CreateOrderRecord(orderRecord, req)
|
||||||
CustomerNum: req.CustomerNum,
|
|
||||||
CustomerName: req.CustomerName,
|
|
||||||
ServiceType: i.ServiceType,
|
|
||||||
CurrencyType: i.CurrencyType,
|
|
||||||
Amount: float64(i.Amount),
|
|
||||||
Num: i.Num,
|
|
||||||
Unit: i.Unit,
|
|
||||||
ValueAddUUID: i.ValueUid,
|
|
||||||
Source: int(i.Source),
|
|
||||||
PaymentStatus: int(i.PaymentStatus),
|
|
||||||
SignContract: req.SignContract,
|
|
||||||
Signature: req.Signature,
|
|
||||||
SignedTime: req.SignedTime,
|
|
||||||
Snapshot: req.Snapshot,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
orderRecord := &model.BundleOrderRecords{
|
|
||||||
UUID: orderUUID,
|
|
||||||
OrderNo: orderNo,
|
|
||||||
BundleUUID: req.BundleUuid,
|
|
||||||
BundleName: req.BundleName,
|
|
||||||
CustomerID: req.CustomerID,
|
|
||||||
CustomerNum: req.CustomerNum,
|
|
||||||
CustomerName: req.CustomerName,
|
|
||||||
Amount: req.Amount,
|
|
||||||
AmountType: req.AmountType,
|
|
||||||
TotalAmount: req.TotalAmount,
|
|
||||||
SignContract: req.SignContract,
|
|
||||||
Signature: req.Signature,
|
|
||||||
SignedTime: req.SignedTime,
|
|
||||||
//PayType: req.PayType,
|
|
||||||
PayTime: req.PayTime,
|
|
||||||
Status: req.Status,
|
|
||||||
ContractNo: req.ContractNo,
|
|
||||||
BundleCommonUid: req.BundleCommonUid,
|
|
||||||
FinancialConfirmation: model.ConfirmationNotConfirmed,
|
|
||||||
ExpirationTime: req.ExpirationTime,
|
|
||||||
Language: req.Language,
|
|
||||||
BundleOrderValueAdd: addRecords,
|
|
||||||
}
|
|
||||||
res, err = dao.CreateOrderRecord(orderRecord)
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ service Bundle {
|
|||||||
rpc BundleList(BundleListRequest) returns (BundleListResponse) {}
|
rpc BundleList(BundleListRequest) returns (BundleListResponse) {}
|
||||||
rpc BundleDetail(BundleDetailRequest) returns (BundleDetailResponse) {}
|
rpc BundleDetail(BundleDetailRequest) returns (BundleDetailResponse) {}
|
||||||
|
|
||||||
rpc CreateOrderRecord(OrderCreateRecord) returns (CommonResponse) {}
|
rpc CreateOrderRecord(OrderRecord) returns (CommonResponse) {}
|
||||||
rpc UpdateOrderRecord(OrderRecord) returns (CommonResponse) {}
|
rpc UpdateOrderRecord(OrderRecord) returns (CommonResponse) {}
|
||||||
rpc UpdateOrderRecordByOrderNo(OrderRecord) returns (CommonResponse) {}
|
rpc UpdateOrderRecordByOrderNo(OrderRecord) returns (CommonResponse) {}
|
||||||
rpc OrderRecordsList(OrderRecordsRequest) returns (OrderRecordsResponse) {}
|
rpc OrderRecordsList(OrderRecordsRequest) returns (OrderRecordsResponse) {}
|
||||||
@ -54,37 +54,6 @@ service Bundle {
|
|||||||
rpc AddBundleBalance(AddBundleBalanceReq) returns (AddBundleBalanceResp) {} // 创建新的余量信息
|
rpc AddBundleBalance(AddBundleBalanceReq) returns (AddBundleBalanceResp) {} // 创建新的余量信息
|
||||||
|
|
||||||
}
|
}
|
||||||
message OrderCreateRecord{
|
|
||||||
string bundleUuid = 1 [json_name = "bundleUuid"];
|
|
||||||
string language = 2 [json_name = "language"];
|
|
||||||
string expirationTime = 3 [json_name = "expirationTime"];
|
|
||||||
string bundleName = 4 [json_name = "bundleName"];
|
|
||||||
string customerID = 5 [json_name = "customerID"];
|
|
||||||
string customerNum = 6 [json_name = "customerNum"];
|
|
||||||
string customerName = 7 [json_name = "customerName"];
|
|
||||||
float amount = 8 [json_name = "amount"];
|
|
||||||
int64 amountType = 9 [json_name = "amountType"];
|
|
||||||
string signContract = 10 [json_name = "signContract"];
|
|
||||||
string signature = 11 [json_name = "signature"];
|
|
||||||
string signedTime = 12 [json_name = "signedTime"];
|
|
||||||
int64 status = 13 [json_name = "status"];
|
|
||||||
string payTime = 14 [json_name = "payTime"];
|
|
||||||
string contractNo = 15 [json_name = "contractNo"];
|
|
||||||
float totalAmount = 16 [json_name = "totalAmount"]; //总金额
|
|
||||||
string bundleCommonUid = 17 [json_name = "bundleCommonUid"];
|
|
||||||
string snapshot = 18 [json_name = "snapshot"];
|
|
||||||
repeated OrderCreateAddRecord addRecords = 19 [json_name = "addRecords"]; //增值服务
|
|
||||||
}
|
|
||||||
message OrderCreateAddRecord{
|
|
||||||
int32 serviceType = 1 [json_name = "serviceType"];
|
|
||||||
string valueUid = 2 [json_name = "valueUid"];
|
|
||||||
int64 currencyType = 3 [json_name = "currencyType"];
|
|
||||||
float amount = 4 [json_name = "amount"];
|
|
||||||
int32 num = 5 [json_name = "num"];
|
|
||||||
string unit = 6 [json_name = "unit"];
|
|
||||||
int32 source = 7 [json_name = "source"];
|
|
||||||
int32 paymentStatus = 8 [json_name = "paymentStatus"];
|
|
||||||
}
|
|
||||||
message OrderRecordsRequestV2{
|
message OrderRecordsRequestV2{
|
||||||
string customerName = 1;
|
string customerName = 1;
|
||||||
string telNum = 2;
|
string telNum = 2;
|
||||||
@ -285,7 +254,6 @@ message AddPriceOptionsInfo {
|
|||||||
message PriceOptionsInfo {
|
message PriceOptionsInfo {
|
||||||
int32 id = 1 [json_name = "id"];
|
int32 id = 1 [json_name = "id"];
|
||||||
string valueUid = 2 [json_name = "valueUid"];
|
string valueUid = 2 [json_name = "valueUid"];
|
||||||
int32 num = 3 [json_name = "num"];
|
|
||||||
}
|
}
|
||||||
message OrderRecordsRequest {
|
message OrderRecordsRequest {
|
||||||
int32 page = 1 [json_name = "page"];
|
int32 page = 1 [json_name = "page"];
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -7,8 +7,8 @@ import (
|
|||||||
fmt "fmt"
|
fmt "fmt"
|
||||||
math "math"
|
math "math"
|
||||||
proto "github.com/golang/protobuf/proto"
|
proto "github.com/golang/protobuf/proto"
|
||||||
_ "github.com/mwitkow/go-proto-validators"
|
|
||||||
_ "google.golang.org/protobuf/types/descriptorpb"
|
_ "google.golang.org/protobuf/types/descriptorpb"
|
||||||
|
_ "github.com/mwitkow/go-proto-validators"
|
||||||
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -17,19 +17,6 @@ var _ = proto.Marshal
|
|||||||
var _ = fmt.Errorf
|
var _ = fmt.Errorf
|
||||||
var _ = math.Inf
|
var _ = math.Inf
|
||||||
|
|
||||||
func (this *OrderCreateRecord) Validate() error {
|
|
||||||
for _, item := range this.AddRecords {
|
|
||||||
if item != nil {
|
|
||||||
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(item); err != nil {
|
|
||||||
return github_com_mwitkow_go_proto_validators.FieldError("AddRecords", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *OrderCreateAddRecord) Validate() error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
func (this *OrderRecordsRequestV2) Validate() error {
|
func (this *OrderRecordsRequestV2) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-triple v1.0.8
|
// - protoc-gen-go-triple v1.0.8
|
||||||
// - protoc v4.24.0--rc1
|
// - protoc v3.20.3
|
||||||
// source: pb/bundle.proto
|
// source: pb/bundle.proto
|
||||||
|
|
||||||
package bundle
|
package bundle
|
||||||
@ -37,7 +37,7 @@ type BundleClient interface {
|
|||||||
BundleDetailV2(ctx context.Context, in *BundleDetailRequest, opts ...grpc_go.CallOption) (*BundleDetailResponseV2, common.ErrorWithAttachment)
|
BundleDetailV2(ctx context.Context, in *BundleDetailRequest, opts ...grpc_go.CallOption) (*BundleDetailResponseV2, common.ErrorWithAttachment)
|
||||||
BundleList(ctx context.Context, in *BundleListRequest, opts ...grpc_go.CallOption) (*BundleListResponse, 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)
|
BundleDetail(ctx context.Context, in *BundleDetailRequest, opts ...grpc_go.CallOption) (*BundleDetailResponse, common.ErrorWithAttachment)
|
||||||
CreateOrderRecord(ctx context.Context, in *OrderCreateRecord, opts ...grpc_go.CallOption) (*CommonResponse, 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)
|
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)
|
UpdateOrderRecordByOrderNo(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)
|
OrderRecordsList(ctx context.Context, in *OrderRecordsRequest, opts ...grpc_go.CallOption) (*OrderRecordsResponse, common.ErrorWithAttachment)
|
||||||
@ -78,7 +78,7 @@ type BundleClientImpl struct {
|
|||||||
BundleDetailV2 func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponseV2, error)
|
BundleDetailV2 func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponseV2, error)
|
||||||
BundleList func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
|
BundleList func(ctx context.Context, in *BundleListRequest) (*BundleListResponse, error)
|
||||||
BundleDetail func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponse, error)
|
BundleDetail func(ctx context.Context, in *BundleDetailRequest) (*BundleDetailResponse, error)
|
||||||
CreateOrderRecord func(ctx context.Context, in *OrderCreateRecord) (*CommonResponse, error)
|
CreateOrderRecord func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
|
||||||
UpdateOrderRecord 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)
|
UpdateOrderRecordByOrderNo func(ctx context.Context, in *OrderRecord) (*CommonResponse, error)
|
||||||
OrderRecordsList func(ctx context.Context, in *OrderRecordsRequest) (*OrderRecordsResponse, error)
|
OrderRecordsList func(ctx context.Context, in *OrderRecordsRequest) (*OrderRecordsResponse, error)
|
||||||
@ -168,7 +168,7 @@ func (c *bundleClient) BundleDetail(ctx context.Context, in *BundleDetailRequest
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BundleDetail", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/BundleDetail", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *bundleClient) CreateOrderRecord(ctx context.Context, in *OrderCreateRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
func (c *bundleClient) CreateOrderRecord(ctx context.Context, in *OrderRecord, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||||
out := new(CommonResponse)
|
out := new(CommonResponse)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateOrderRecord", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/CreateOrderRecord", in, out)
|
||||||
@ -313,7 +313,7 @@ type BundleServer interface {
|
|||||||
BundleDetailV2(context.Context, *BundleDetailRequest) (*BundleDetailResponseV2, error)
|
BundleDetailV2(context.Context, *BundleDetailRequest) (*BundleDetailResponseV2, error)
|
||||||
BundleList(context.Context, *BundleListRequest) (*BundleListResponse, error)
|
BundleList(context.Context, *BundleListRequest) (*BundleListResponse, error)
|
||||||
BundleDetail(context.Context, *BundleDetailRequest) (*BundleDetailResponse, error)
|
BundleDetail(context.Context, *BundleDetailRequest) (*BundleDetailResponse, error)
|
||||||
CreateOrderRecord(context.Context, *OrderCreateRecord) (*CommonResponse, error)
|
CreateOrderRecord(context.Context, *OrderRecord) (*CommonResponse, error)
|
||||||
UpdateOrderRecord(context.Context, *OrderRecord) (*CommonResponse, error)
|
UpdateOrderRecord(context.Context, *OrderRecord) (*CommonResponse, error)
|
||||||
UpdateOrderRecordByOrderNo(context.Context, *OrderRecord) (*CommonResponse, error)
|
UpdateOrderRecordByOrderNo(context.Context, *OrderRecord) (*CommonResponse, error)
|
||||||
OrderRecordsList(context.Context, *OrderRecordsRequest) (*OrderRecordsResponse, error)
|
OrderRecordsList(context.Context, *OrderRecordsRequest) (*OrderRecordsResponse, error)
|
||||||
@ -373,7 +373,7 @@ func (UnimplementedBundleServer) BundleList(context.Context, *BundleListRequest)
|
|||||||
func (UnimplementedBundleServer) BundleDetail(context.Context, *BundleDetailRequest) (*BundleDetailResponse, error) {
|
func (UnimplementedBundleServer) BundleDetail(context.Context, *BundleDetailRequest) (*BundleDetailResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method BundleDetail not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method BundleDetail not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedBundleServer) CreateOrderRecord(context.Context, *OrderCreateRecord) (*CommonResponse, error) {
|
func (UnimplementedBundleServer) CreateOrderRecord(context.Context, *OrderRecord) (*CommonResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method CreateOrderRecord not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method CreateOrderRecord not implemented")
|
||||||
}
|
}
|
||||||
func (UnimplementedBundleServer) UpdateOrderRecord(context.Context, *OrderRecord) (*CommonResponse, error) {
|
func (UnimplementedBundleServer) UpdateOrderRecord(context.Context, *OrderRecord) (*CommonResponse, error) {
|
||||||
@ -729,7 +729,7 @@ func _Bundle_BundleDetail_Handler(srv interface{}, ctx context.Context, dec func
|
|||||||
}
|
}
|
||||||
|
|
||||||
func _Bundle_CreateOrderRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
func _Bundle_CreateOrderRecord_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(OrderCreateRecord)
|
in := new(OrderRecord)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user