解决冲突
This commit is contained in:
commit
edc85ae53e
@ -127,3 +127,6 @@ func (b *BundleProvider) ListUnfinishedInfos(_ context.Context, req *bundle.Auto
|
|||||||
func (b *BundleProvider) SoftDeleteUnfinishedInfo(_ context.Context, req *bundle.SoftDeleteUnfinishedInfoRequest) (res *bundle.CommonResponse, err error) {
|
func (b *BundleProvider) SoftDeleteUnfinishedInfo(_ context.Context, req *bundle.SoftDeleteUnfinishedInfoRequest) (res *bundle.CommonResponse, err error) {
|
||||||
return logic.SoftDeleteUnfinishedInfo(req)
|
return logic.SoftDeleteUnfinishedInfo(req)
|
||||||
}
|
}
|
||||||
|
func (b *BundleProvider) ReSignTheContract(_ context.Context, req *bundle.ReSignTheContractRequest) (res *bundle.CommonResponse, err error) {
|
||||||
|
return logic.ReSignTheContract(req)
|
||||||
|
}
|
||||||
|
|||||||
@ -359,6 +359,7 @@ func OrderRecordDetail(req *bundle.OrderRecordsDetailRequest) (res *bundle.Order
|
|||||||
ValueAddBundleAmount: orderRecord.ValueAddBundleAmount,
|
ValueAddBundleAmount: orderRecord.ValueAddBundleAmount,
|
||||||
TotalAmount: orderRecord.TotalAmount,
|
TotalAmount: orderRecord.TotalAmount,
|
||||||
ExpirationTime: orderRecord.ExpirationTime,
|
ExpirationTime: orderRecord.ExpirationTime,
|
||||||
|
ReSignature: int32(orderRecord.ReSignature),
|
||||||
}
|
}
|
||||||
res.AddInfos = make([]*bundle.AddInfo, 0)
|
res.AddInfos = make([]*bundle.AddInfo, 0)
|
||||||
res.AddInfos = addInfos
|
res.AddInfos = addInfos
|
||||||
@ -849,6 +850,7 @@ func ListUnfinishedInfos(req *bundle.AutoCreateUserAndOrderRequest) (res *bundle
|
|||||||
unfinishedInfo.OrderPayCurrency = info.OrderPayCurrency
|
unfinishedInfo.OrderPayCurrency = info.OrderPayCurrency
|
||||||
unfinishedInfo.OrderAccountCurrency = info.OrderAccountCurrency
|
unfinishedInfo.OrderAccountCurrency = info.OrderAccountCurrency
|
||||||
unfinishedInfo.PayTime = info.PayTime.Format("2006-01-02 15:04:05")
|
unfinishedInfo.PayTime = info.PayTime.Format("2006-01-02 15:04:05")
|
||||||
|
unfinishedInfo.CardNum = info.CardNum
|
||||||
res.UnfinishedInfos = append(res.UnfinishedInfos, unfinishedInfo)
|
res.UnfinishedInfos = append(res.UnfinishedInfos, unfinishedInfo)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -874,3 +876,71 @@ func SoftDeleteUnfinishedInfo(req *bundle.SoftDeleteUnfinishedInfoRequest) (res
|
|||||||
|
|
||||||
return res, nil
|
return res, nil
|
||||||
}
|
}
|
||||||
|
func ReSignTheContract(req *bundle.ReSignTheContractRequest) (*bundle.CommonResponse, error) {
|
||||||
|
res := new(bundle.CommonResponse)
|
||||||
|
|
||||||
|
// 验证请求参数
|
||||||
|
if req.OrderNo == "" {
|
||||||
|
return res, errors.New("订单号不能为空")
|
||||||
|
}
|
||||||
|
|
||||||
|
now := time.Now().Format("2006-01-02 15:04:05")
|
||||||
|
|
||||||
|
// 开启事务确保两个表的更新一致性
|
||||||
|
tx := app.ModuleClients.BundleDB.Begin()
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
tx.Rollback()
|
||||||
|
//err = fmt.Errorf("事务执行失败: %v", r)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
|
// 1. 更新 BundleOrderRecords 表
|
||||||
|
recordsUpdate := map[string]interface{}{
|
||||||
|
"sign_contract": req.SignContract,
|
||||||
|
"signed_time": now,
|
||||||
|
"contract_no": req.ContractNo,
|
||||||
|
"re_signature": 2,
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := tx.Model(&model.BundleOrderRecords{}).
|
||||||
|
Where("order_no = ?", req.OrderNo).
|
||||||
|
Updates(recordsUpdate).Error; err != nil {
|
||||||
|
tx.Rollback()
|
||||||
|
return res, fmt.Errorf("更新订单记录失败: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 更新 BundleOrderValueAdd 表
|
||||||
|
valueAddUpdate := map[string]interface{}{
|
||||||
|
"sign_contract": req.SignContract,
|
||||||
|
"signed_time": now,
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := tx.Model(&model.BundleOrderValueAdd{}).
|
||||||
|
Where("order_no = ?", req.OrderNo).
|
||||||
|
Updates(valueAddUpdate).Error; err != nil {
|
||||||
|
tx.Rollback()
|
||||||
|
return res, fmt.Errorf("更新订单增值信息失败: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 检查是否实际更新了记录
|
||||||
|
var affectedRecords, affectedValueAdd int64
|
||||||
|
tx.Model(&model.BundleOrderRecords{}).Where("order_no = ?", req.OrderNo).Count(&affectedRecords)
|
||||||
|
tx.Model(&model.BundleOrderValueAdd{}).Where("order_no = ?", req.OrderNo).Count(&affectedValueAdd)
|
||||||
|
|
||||||
|
if affectedRecords == 0 {
|
||||||
|
tx.Rollback()
|
||||||
|
return res, errors.New("未找到对应的订单记录")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提交事务
|
||||||
|
if err := tx.Commit().Error; err != nil {
|
||||||
|
return res, fmt.Errorf("事务提交失败: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 设置响应信息(如果有需要)
|
||||||
|
res.Msg = "重新签约成功"
|
||||||
|
res.OrderNo = req.OrderNo
|
||||||
|
|
||||||
|
return res, nil
|
||||||
|
}
|
||||||
|
|||||||
@ -73,7 +73,7 @@ func SaveBundle(req *bundle.BundleProfile) (res *bundle.SaveResponse, err error)
|
|||||||
Content: req.Content,
|
Content: req.Content,
|
||||||
Price: req.Price,
|
Price: req.Price,
|
||||||
PriceType: req.PriceType,
|
PriceType: req.PriceType,
|
||||||
Contract: "https://e-cdn.fontree.cn/fonchain-main/prod/file/saas/contract/template-25032801.pdf",
|
Contract: "https://e-cdn.fontree.cn/fonchain-main/prod/file/contract/saas/template-25122501.pdf",
|
||||||
ImgOption: int8(req.ImgOption),
|
ImgOption: int8(req.ImgOption),
|
||||||
BgImg1: req.BgImg1,
|
BgImg1: req.BgImg1,
|
||||||
BgImg2: req.BgImg2,
|
BgImg2: req.BgImg2,
|
||||||
|
|||||||
@ -182,3 +182,8 @@ func SoftDeleteUnfinishedInfo(req *bundle.SoftDeleteUnfinishedInfoRequest) (res
|
|||||||
res, err = dao.SoftDeleteUnfinishedInfo(req)
|
res, err = dao.SoftDeleteUnfinishedInfo(req)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
func ReSignTheContract(req *bundle.ReSignTheContractRequest) (res *bundle.CommonResponse, err error) {
|
||||||
|
res = new(bundle.CommonResponse)
|
||||||
|
res, err = dao.ReSignTheContract(req)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|||||||
@ -41,6 +41,7 @@ type BundleOrderRecords struct {
|
|||||||
BundleCommonJson json.RawMessage `json:"bundle_common_json" gorm:"column:bundle_common_json;type:json;serializer:json;comment:套餐信息"`
|
BundleCommonJson json.RawMessage `json:"bundle_common_json" gorm:"column:bundle_common_json;type:json;serializer:json;comment:套餐信息"`
|
||||||
Language string `gorm:"column:language;comment:语言" json:"language"`
|
Language string `gorm:"column:language;comment:语言" json:"language"`
|
||||||
BundleOrderValueAdd []BundleOrderValueAdd `gorm:"foreignKey:OrderUUID;references:UUID" json:"bundleOrderValueAdd"`
|
BundleOrderValueAdd []BundleOrderValueAdd `gorm:"foreignKey:OrderUUID;references:UUID" json:"bundleOrderValueAdd"`
|
||||||
|
ReSignature int `json:"reSignature" gorm:"column:re_signature;default:2;type:int;comment:是否重新签 1:是 2:否"`
|
||||||
}
|
}
|
||||||
type BundleOrderValueAdd struct {
|
type BundleOrderValueAdd struct {
|
||||||
gorm.Model
|
gorm.Model
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"gorm.io/gorm"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 用来自动导入 来创建用户和订单的 数据
|
// 用来自动导入 来创建用户和订单的 数据
|
||||||
@ -19,6 +20,7 @@ type FieePaymentAuto struct {
|
|||||||
UserIdCardFrontUrl string `json:"userIdCardFrontUrl" gorm:"column:user_id_card_front_url;type:varchar(1024);comment:用户身份证正面"`
|
UserIdCardFrontUrl string `json:"userIdCardFrontUrl" gorm:"column:user_id_card_front_url;type:varchar(1024);comment:用户身份证正面"`
|
||||||
UserIdCardReverseUrl string `json:"userIdCardReverseUrl" gorm:"column:user_id_card_reverse_url;type:varchar(1024);comment:用户身份证反面"`
|
UserIdCardReverseUrl string `json:"userIdCardReverseUrl" gorm:"column:user_id_card_reverse_url;type:varchar(1024);comment:用户身份证反面"`
|
||||||
UserIdCardValidity string `json:"userIdCardValidity" gorm:"column:user_id_card_validity;type:varchar(64);comment:证件有效期"`
|
UserIdCardValidity string `json:"userIdCardValidity" gorm:"column:user_id_card_validity;type:varchar(64);comment:证件有效期"`
|
||||||
|
CardNum string `json:"cardNum" gorm:"column:card_num;type:varchar(64);comment:证件号码"`
|
||||||
OrderNo string `json:"orderNo" gorm:"column:order_no;type:varchar(128);comment:订单编号"`
|
OrderNo string `json:"orderNo" gorm:"column:order_no;type:varchar(128);comment:订单编号"`
|
||||||
OrderPayAmount string `gorm:"column:order_pay_amount;type:decimal(20,2);comment:订单支付金额" json:"orderPayAmount"`
|
OrderPayAmount string `gorm:"column:order_pay_amount;type:decimal(20,2);comment:订单支付金额" json:"orderPayAmount"`
|
||||||
OrderSettlementAmount string `gorm:"column:order_settlement_amount;type:decimal(20,2);comment:订单结算金额" json:"orderSettlementAmount"`
|
OrderSettlementAmount string `gorm:"column:order_settlement_amount;type:decimal(20,2);comment:订单结算金额" json:"orderSettlementAmount"`
|
||||||
|
|||||||
@ -37,6 +37,7 @@ service Bundle {
|
|||||||
rpc OrderRecordsListV2(OrderRecordsRequestV2) returns (OrderRecordsResponseV2) {}
|
rpc OrderRecordsListV2(OrderRecordsRequestV2) returns (OrderRecordsResponseV2) {}
|
||||||
rpc OrderListByOrderNo(OrderInfoByOrderNoRequest) returns (OrderInfoByOrderNoResp) {}
|
rpc OrderListByOrderNo(OrderInfoByOrderNoRequest) returns (OrderInfoByOrderNoResp) {}
|
||||||
rpc OnlyAddValueListByOrderNo(OnlyAddValueListByOrderNoRequest) returns (OnlyAddValueListByOrderNoResp) {} // 根据orderNo只查增值服务
|
rpc OnlyAddValueListByOrderNo(OnlyAddValueListByOrderNoRequest) returns (OnlyAddValueListByOrderNoResp) {} // 根据orderNo只查增值服务
|
||||||
|
rpc ReSignTheContract(ReSignTheContractRequest) returns (CommonResponse) {}
|
||||||
|
|
||||||
//增值套餐
|
//增值套餐
|
||||||
rpc CreateValueAddBundle(CreateValueAddBundleRequest) returns (CreateValueAddBundleResponse) {}
|
rpc CreateValueAddBundle(CreateValueAddBundleRequest) returns (CreateValueAddBundleResponse) {}
|
||||||
@ -115,6 +116,11 @@ service Bundle {
|
|||||||
rpc MetricsVideoSubmitExport(MetricsVideoSubmitExportReq) returns (MetricsVideoSubmitExportResp) {}
|
rpc MetricsVideoSubmitExport(MetricsVideoSubmitExportReq) returns (MetricsVideoSubmitExportResp) {}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
message ReSignTheContractRequest{
|
||||||
|
string orderNo = 1;
|
||||||
|
string contractNo = 2;
|
||||||
|
string signContract = 3;
|
||||||
|
}
|
||||||
message DeleteValueAddServiceRequest{
|
message DeleteValueAddServiceRequest{
|
||||||
string orderNo = 1;
|
string orderNo = 1;
|
||||||
uint64 userID = 2;
|
uint64 userID = 2;
|
||||||
@ -429,6 +435,7 @@ message OrderRecord {
|
|||||||
string expirationTime = 37 [json_name = "expirationTime"];
|
string expirationTime = 37 [json_name = "expirationTime"];
|
||||||
string snapshot = 38 [json_name = "snapshot"];
|
string snapshot = 38 [json_name = "snapshot"];
|
||||||
repeated AddInfo addInfos = 39 [json_name = "addInfos"];
|
repeated AddInfo addInfos = 39 [json_name = "addInfos"];
|
||||||
|
int32 reSignature = 40 [json_name = "reSignature"];
|
||||||
}
|
}
|
||||||
message AddInfo{
|
message AddInfo{
|
||||||
string orderNo = 1 [json_name = "orderNo"];
|
string orderNo = 1 [json_name = "orderNo"];
|
||||||
@ -1145,6 +1152,7 @@ message UnfinishedInfo {
|
|||||||
string orderPayCurrency = 17;
|
string orderPayCurrency = 17;
|
||||||
string orderAccountCurrency = 18;
|
string orderAccountCurrency = 18;
|
||||||
string payTime = 19;
|
string payTime = 19;
|
||||||
|
string cardNum = 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
message SoftDeleteUnfinishedInfoRequest {
|
message SoftDeleteUnfinishedInfoRequest {
|
||||||
|
|||||||
10428
pb/bundle/bundle.pb.go
10428
pb/bundle/bundle.pb.go
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"
|
||||||
_ "google.golang.org/protobuf/types/descriptorpb"
|
|
||||||
_ "github.com/mwitkow/go-proto-validators"
|
_ "github.com/mwitkow/go-proto-validators"
|
||||||
|
_ "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"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -17,6 +17,9 @@ var _ = proto.Marshal
|
|||||||
var _ = fmt.Errorf
|
var _ = fmt.Errorf
|
||||||
var _ = math.Inf
|
var _ = math.Inf
|
||||||
|
|
||||||
|
func (this *ReSignTheContractRequest) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func (this *DeleteValueAddServiceRequest) Validate() error {
|
func (this *DeleteValueAddServiceRequest) 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.5
|
// - protoc-gen-go-triple v1.0.5
|
||||||
// - protoc v5.26.0
|
// - protoc v6.32.0
|
||||||
// source: pb/bundle.proto
|
// source: pb/bundle.proto
|
||||||
|
|
||||||
package bundle
|
package bundle
|
||||||
@ -50,6 +50,7 @@ type BundleClient interface {
|
|||||||
OrderRecordsListV2(ctx context.Context, in *OrderRecordsRequestV2, opts ...grpc_go.CallOption) (*OrderRecordsResponseV2, common.ErrorWithAttachment)
|
OrderRecordsListV2(ctx context.Context, in *OrderRecordsRequestV2, opts ...grpc_go.CallOption) (*OrderRecordsResponseV2, common.ErrorWithAttachment)
|
||||||
OrderListByOrderNo(ctx context.Context, in *OrderInfoByOrderNoRequest, opts ...grpc_go.CallOption) (*OrderInfoByOrderNoResp, common.ErrorWithAttachment)
|
OrderListByOrderNo(ctx context.Context, in *OrderInfoByOrderNoRequest, opts ...grpc_go.CallOption) (*OrderInfoByOrderNoResp, common.ErrorWithAttachment)
|
||||||
OnlyAddValueListByOrderNo(ctx context.Context, in *OnlyAddValueListByOrderNoRequest, opts ...grpc_go.CallOption) (*OnlyAddValueListByOrderNoResp, common.ErrorWithAttachment)
|
OnlyAddValueListByOrderNo(ctx context.Context, in *OnlyAddValueListByOrderNoRequest, opts ...grpc_go.CallOption) (*OnlyAddValueListByOrderNoResp, common.ErrorWithAttachment)
|
||||||
|
ReSignTheContract(ctx context.Context, in *ReSignTheContractRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment)
|
||||||
// 增值套餐
|
// 增值套餐
|
||||||
CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, 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)
|
ValueAddBundleList(ctx context.Context, in *ValueAddBundleListRequest, opts ...grpc_go.CallOption) (*ValueAddBundleListResponse, common.ErrorWithAttachment)
|
||||||
@ -145,6 +146,7 @@ type BundleClientImpl struct {
|
|||||||
OrderRecordsListV2 func(ctx context.Context, in *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error)
|
OrderRecordsListV2 func(ctx context.Context, in *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error)
|
||||||
OrderListByOrderNo func(ctx context.Context, in *OrderInfoByOrderNoRequest) (*OrderInfoByOrderNoResp, error)
|
OrderListByOrderNo func(ctx context.Context, in *OrderInfoByOrderNoRequest) (*OrderInfoByOrderNoResp, error)
|
||||||
OnlyAddValueListByOrderNo func(ctx context.Context, in *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error)
|
OnlyAddValueListByOrderNo func(ctx context.Context, in *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error)
|
||||||
|
ReSignTheContract func(ctx context.Context, in *ReSignTheContractRequest) (*CommonResponse, error)
|
||||||
CreateValueAddBundle func(ctx context.Context, in *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
|
CreateValueAddBundle func(ctx context.Context, in *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
|
||||||
ValueAddBundleList func(ctx context.Context, in *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
ValueAddBundleList func(ctx context.Context, in *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
||||||
ValueAddBundleDetail func(ctx context.Context, in *ValueAddBundleDetailRequest) (*ValueAddBundleDetailResponse, error)
|
ValueAddBundleDetail func(ctx context.Context, in *ValueAddBundleDetailRequest) (*ValueAddBundleDetailResponse, error)
|
||||||
@ -349,6 +351,12 @@ func (c *bundleClient) OnlyAddValueListByOrderNo(ctx context.Context, in *OnlyAd
|
|||||||
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OnlyAddValueListByOrderNo", in, out)
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/OnlyAddValueListByOrderNo", in, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *bundleClient) ReSignTheContract(ctx context.Context, in *ReSignTheContractRequest, opts ...grpc_go.CallOption) (*CommonResponse, common.ErrorWithAttachment) {
|
||||||
|
out := new(CommonResponse)
|
||||||
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
|
return out, c.cc.Invoke(ctx, "/"+interfaceKey+"/ReSignTheContract", in, out)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *bundleClient) CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment) {
|
func (c *bundleClient) CreateValueAddBundle(ctx context.Context, in *CreateValueAddBundleRequest, opts ...grpc_go.CallOption) (*CreateValueAddBundleResponse, common.ErrorWithAttachment) {
|
||||||
out := new(CreateValueAddBundleResponse)
|
out := new(CreateValueAddBundleResponse)
|
||||||
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
interfaceKey := ctx.Value(constant.InterfaceKey).(string)
|
||||||
@ -723,6 +731,7 @@ type BundleServer interface {
|
|||||||
OrderRecordsListV2(context.Context, *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error)
|
OrderRecordsListV2(context.Context, *OrderRecordsRequestV2) (*OrderRecordsResponseV2, error)
|
||||||
OrderListByOrderNo(context.Context, *OrderInfoByOrderNoRequest) (*OrderInfoByOrderNoResp, error)
|
OrderListByOrderNo(context.Context, *OrderInfoByOrderNoRequest) (*OrderInfoByOrderNoResp, error)
|
||||||
OnlyAddValueListByOrderNo(context.Context, *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error)
|
OnlyAddValueListByOrderNo(context.Context, *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error)
|
||||||
|
ReSignTheContract(context.Context, *ReSignTheContractRequest) (*CommonResponse, error)
|
||||||
// 增值套餐
|
// 增值套餐
|
||||||
CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
|
CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error)
|
||||||
ValueAddBundleList(context.Context, *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
ValueAddBundleList(context.Context, *ValueAddBundleListRequest) (*ValueAddBundleListResponse, error)
|
||||||
@ -863,6 +872,9 @@ func (UnimplementedBundleServer) OrderListByOrderNo(context.Context, *OrderInfoB
|
|||||||
func (UnimplementedBundleServer) OnlyAddValueListByOrderNo(context.Context, *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error) {
|
func (UnimplementedBundleServer) OnlyAddValueListByOrderNo(context.Context, *OnlyAddValueListByOrderNoRequest) (*OnlyAddValueListByOrderNoResp, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method OnlyAddValueListByOrderNo not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method OnlyAddValueListByOrderNo not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedBundleServer) ReSignTheContract(context.Context, *ReSignTheContractRequest) (*CommonResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ReSignTheContract not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedBundleServer) CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error) {
|
func (UnimplementedBundleServer) CreateValueAddBundle(context.Context, *CreateValueAddBundleRequest) (*CreateValueAddBundleResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method CreateValueAddBundle not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method CreateValueAddBundle not implemented")
|
||||||
}
|
}
|
||||||
@ -1703,6 +1715,35 @@ func _Bundle_OnlyAddValueListByOrderNo_Handler(srv interface{}, ctx context.Cont
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Bundle_ReSignTheContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(ReSignTheContractRequest)
|
||||||
|
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("ReSignTheContract", 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_CreateValueAddBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
func _Bundle_CreateValueAddBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc_go.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(CreateValueAddBundleRequest)
|
in := new(CreateValueAddBundleRequest)
|
||||||
if err := dec(in); err != nil {
|
if err := dec(in); err != nil {
|
||||||
@ -3480,6 +3521,10 @@ var Bundle_ServiceDesc = grpc_go.ServiceDesc{
|
|||||||
MethodName: "OnlyAddValueListByOrderNo",
|
MethodName: "OnlyAddValueListByOrderNo",
|
||||||
Handler: _Bundle_OnlyAddValueListByOrderNo_Handler,
|
Handler: _Bundle_OnlyAddValueListByOrderNo_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ReSignTheContract",
|
||||||
|
Handler: _Bundle_ReSignTheContract_Handler,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
MethodName: "CreateValueAddBundle",
|
MethodName: "CreateValueAddBundle",
|
||||||
Handler: _Bundle_CreateValueAddBundle_Handler,
|
Handler: _Bundle_CreateValueAddBundle_Handler,
|
||||||
|
|||||||
@ -47,7 +47,7 @@ func loadMysqlConn(conn string) *gorm.DB {
|
|||||||
// Bundle数据库的自动迁移
|
// Bundle数据库的自动迁移
|
||||||
err = db.AutoMigrate(
|
err = db.AutoMigrate(
|
||||||
&model.BundleProfile{},
|
&model.BundleProfile{},
|
||||||
// &model.BundleOrderRecords{},
|
//&model.BundleOrderRecords{},
|
||||||
&model.ValueAddBundleProfile{},
|
&model.ValueAddBundleProfile{},
|
||||||
//&model.ValueAddBundleRecord{}
|
//&model.ValueAddBundleRecord{}
|
||||||
&model.BundleProfileLang{},
|
&model.BundleProfileLang{},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user