This commit is contained in:
JNG 2026-01-12 18:08:45 +08:00
commit 8b85aeee28
7 changed files with 3440 additions and 7835 deletions

View File

@ -539,6 +539,7 @@ func OrderRecordsListV2(req *bundle.OrderRecordsRequestV2) (res *bundle.OrderRec
Amount: record.Amount,
CustomerId: customerID,
PayTime: record.PayTime,
InviterId: record.InviterID,
}
// 聚合子订单

View File

@ -69,6 +69,7 @@ func CreateOrderRecord(req *bundle.OrderCreateRecord) (res *bundle.CommonRespons
Language: req.Language,
BundleOrderValueAdd: addRecords,
PlatformIds: req.PlatformIds,
InviterID: req.InviterId,
}
res, err = dao.CreateOrderRecord(orderRecord)
return

View File

@ -45,6 +45,7 @@ type BundleOrderRecords struct {
BundleOrderValueAdd []BundleOrderValueAdd `gorm:"foreignKey:OrderUUID;references:UUID" json:"bundleOrderValueAdd"`
ReSignature int `json:"reSignature" gorm:"column:re_signature;default:2;type:int;comment:是否重新签 1:是 2:否"`
PlatformIds PlatformIDs `gorm:"column:platform_ids;type:json;NOT NULL;comment:发布平台ID集合 TIKTOK= 1, YOUTUBE = 2, INS = 3 , DM = 4, BL = 5;" json:"platformIDs"`
InviterID uint64 `gorm:"column:inviter_id;type:bigint;comment:邀请人ID" json:"inviterID"`
}
type BundleOrderValueAdd struct {
gorm.Model

View File

@ -218,6 +218,7 @@ message OrderCreateRecord{
repeated OrderCreateAddRecord addRecords = 20 [json_name = "addRecords"]; //
string orderNo = 21 [json_name = "orderNo"];
repeated uint32 platformIds = 22; // ID集合 (json )
uint64 inviterId = 23; // ID
}
message OrderCreateAddRecord{
int32 serviceType = 1 [json_name = "serviceType"];
@ -270,6 +271,9 @@ message OrderBundleRecordInfo{
int64 customerId = 9;
string payTime = 10;
string subNum = 11;
uint64 inviterId = 12;
string inviterCode = 13;
string inviterName = 14;
}
message OrderAddBundleRecordInfo{
string orderAddNo = 1;

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 v5.26.0
// - protoc v6.32.0
// source: pb/bundle.proto
package bundle

View File

@ -68,6 +68,11 @@ func loadMysqlConn(conn string) *gorm.DB {
fmt.Println(err)
}
}
if db.Migrator().HasColumn(&model.BundleOrderRecords{}, "inviter_id") == false {
if err := db.Migrator().AddColumn(&model.BundleOrderRecords{}, "inviter_id"); err != nil {
fmt.Println(err)
}
}
if err != nil {
// return nil
panic(err)