功能添加

This commit is contained in:
songchuang 2025-03-29 05:02:05 +08:00
parent 3e3c9097de
commit d5f59b1435
3 changed files with 669 additions and 357 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-triple. DO NOT EDIT.
// versions:
// - protoc-gen-go-triple v1.0.5
// - protoc v3.21.8
// - protoc-gen-go-triple v1.0.8
// - protoc v3.10.1
// source: pb/bundle.proto
package bundle
@ -38,7 +38,7 @@ type BundleClient interface {
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)
OrderRecordsDetail(ctx context.Context, in *OrderRecordsDetailRequest, opts ...grpc_go.CallOption) (*OrderRecordsDetailResponse, common.ErrorWithAttachment)
// 增值套餐
//增值套餐
CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment)
ValueAddBundleList(ctx context.Context, in *ValueAddBundleListRequest, opts ...grpc_go.CallOption) (*ValueAddBundleListResponse, common.ErrorWithAttachment)
ValueAddBundleDetail(ctx context.Context, in *ValueAddBundleDetailRequest, opts ...grpc_go.CallOption) (*ValueAddBundleDetailResponse, common.ErrorWithAttachment)
@ -168,7 +168,7 @@ type BundleServer interface {
UpdateOrderRecordByOrderNo(context.Context, *OrderRecord) (*CommonResponse, error)
OrderRecordsList(context.Context, *OrderRecordsRequest) (*OrderRecordsResponse, error)
OrderRecordsDetail(context.Context, *OrderRecordsDetailRequest) (*OrderRecordsDetailResponse, error)
// 增值套餐
//增值套餐
CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
ValueAddBundleList(context.Context, *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
ValueAddBundleDetail(context.Context, *ValueAddBundleDetailRequest) (*ValueAddBundleDetailResponse, error)

View File

@ -105,6 +105,7 @@ func CreateBundleOrderSignature(c *gin.Context) {
req.ValueAddBundleUuid = valueAddBundleDetail.Data.Uuid
req.ValueAddOriginalPrice = valueAddBundleDetail.Data.OriginalPrice
req.ValueAddDiscountPrice = valueAddBundleDetail.Data.DiscountPrice
req.AddBundleCommonUid = valueAddBundleDetail.Data.AddBundleCommonUid
if valueAddBundleDetail.Data.Choose { // 可选条数
req.ValueAddBundleAmount = valueAddBundleDetail.Data.DiscountPrice * float32(req.Num)
@ -121,7 +122,7 @@ func CreateBundleOrderSignature(c *gin.Context) {
req.BundleName = bundleDetail.Bundle.Name
req.Amount = bundleDetail.Bundle.Price
req.AmountType = bundleDetail.Bundle.PriceType
req.BundleCommonUid = bundleDetail.Bundle.BundleCommonUid
req.TotalAmount = req.Amount + req.ValueAddBundleAmount
req.PayType = 1 // 默认 人民币