Update:增加先用后付合同

This commit is contained in:
jiaji.H 2026-06-10 13:22:07 +08:00
parent f6127e87a3
commit debafff038
4 changed files with 4455 additions and 4440 deletions

View File

@ -68,19 +68,20 @@ func SaveBundle(req *bundle.BundleProfile) (res *bundle.SaveResponse, err error)
}
//套餐主表数据
bundleProfile := &model.BundleProfile{
Name: req.Name,
Sort: req.Sort,
Content: req.Content,
Price: req.Price,
PriceType: req.PriceType,
Contract: "https://e-cdn.fontree.cn/fonchain-main/prod/file/contract/saas/template-25122501.pdf",
ImgOption: int8(req.ImgOption),
BgImg1: req.BgImg1,
BgImg2: req.BgImg2,
ShelfStatus: model.BundleShelfStatusDown, //默认初始状态为2-下架
FontColor: req.FontColor,
BundleType: req.BundleType,
PayLaterTime: req.PayLaterTime,
Name: req.Name,
Sort: req.Sort,
Content: req.Content,
Price: req.Price,
PriceType: req.PriceType,
Contract: "https://e-cdn.fontree.cn/fonchain-main/prod/file/contract/saas/template-25122501.pdf",
PayLaterContract: "https://e-cdn.fontree.cn/fonchain-main/prod/file/contract/saas/template-25122501.pdf",
ImgOption: int8(req.ImgOption),
BgImg1: req.BgImg1,
BgImg2: req.BgImg2,
ShelfStatus: model.BundleShelfStatusDown, //默认初始状态为2-下架
FontColor: req.FontColor,
BundleType: req.BundleType,
PayLaterTime: req.PayLaterTime,
}
bundleLang := &model.BundleProfileLang{
Name: req.Name,
@ -381,22 +382,23 @@ func BundleDetailV2(req *bundle.BundleDetailRequest) (res *bundle.BundleDetailRe
if detail != nil {
bundleProfile = &bundle.BundleProfile{
Uuid: detail.UUID,
Name: bundleProfileLang.Name,
Content: bundleProfileLang.Content,
Price: bundleProfileLang.Price,
PriceType: bundleProfileLang.PriceType,
ImgOption: int32(detail.ImgOption),
BgImg1: detail.BgImg1,
BgImg2: detail.BgImg2,
FontColor: detail.FontColor,
Sort: detail.Sort,
ShelfStatus: detail.ShelfStatus,
CreatedAt: detail.CreatedAt.Format("2006-01-02 15:04:05"),
UpdatedAt: detail.UpdatedAt.Format("2006-01-02 15:04:05"),
Contract: detail.Contract,
BundleType: int64(detail.BundleType),
PayLaterTime: int64(bundleProfileLang.PayLaterTime),
Uuid: detail.UUID,
Name: bundleProfileLang.Name,
Content: bundleProfileLang.Content,
Price: bundleProfileLang.Price,
PriceType: bundleProfileLang.PriceType,
ImgOption: int32(detail.ImgOption),
BgImg1: detail.BgImg1,
BgImg2: detail.BgImg2,
FontColor: detail.FontColor,
Sort: detail.Sort,
ShelfStatus: detail.ShelfStatus,
CreatedAt: detail.CreatedAt.Format("2006-01-02 15:04:05"),
UpdatedAt: detail.UpdatedAt.Format("2006-01-02 15:04:05"),
Contract: detail.Contract,
PayLaterContract: detail.PayLaterContract,
BundleType: int64(detail.BundleType),
PayLaterTime: int64(bundleProfileLang.PayLaterTime),
}
if len(detail.BundleToValueAddService) > 0 {
var valueUuids []string

View File

@ -24,7 +24,8 @@ type BundleProfile struct {
Name string `json:"name" gorm:"column:name;type:varchar(2048);comment:套餐名称"`
Price float32 `json:"price" gorm:"column:price;type:decimal(12,2);comment:套餐价格"`
PriceType int64 `json:"priceType" gorm:"column:price_type;type:int;comment:套餐类型 1:人民币 2:美元"`
Contract string `json:"contract" gorm:"type:varchar(1024);comment:合同"`
Contract string `json:"contract" gorm:"type:varchar(1024);comment:普通套餐合同"`
PayLaterContract string `json:"payLaterContract" gorm:"type:varchar(1024);comment:先用后付套餐合同"`
ContractDuration int `json:"contractDuration" gorm:"column:contract_duration;type:int;comment:合同有效时长"`
Content string `json:"content" gorm:"column:content;type:text;comment:套餐内容"`
CompanySign string `json:"companySign" gorm:"column:company_sign;type:varchar(1024);comment:公司签名"`

View File

@ -359,23 +359,24 @@ message BundleProfile {
int64 priceType = 4 [json_name = "priceType"];
string content = 5 [json_name = "content"];
string contract = 6 [json_name = "contract"];
string language = 7 [json_name = "language"];
string createdAt = 8 [json_name = "createdAt"];
string updatedAt = 9 [json_name = "updatedAt"];
string companySign = 10 [json_name = "companySign"];
int64 contractDuration = 11 [json_name = "contractDuration"];
string bundleCommonUid = 12 [json_name = "bundleCommonUid"];
int64 sort = 13 [json_name = "sort"];
string bgImg1 = 14 [json_name = "bgImg1"];
string bgImg2 = 15 [json_name = "bgImg2"];
int64 shelfStatus = 16 [json_name = "shelfStatus"]; // 1 2
repeated SelectValueAddService selectValueAddService = 17 [json_name = "SelectValueAddService"];
repeated SelectValueAdditionalService selectValueAdditionalService = 18 [json_name = "SelectValueAdditionalService"];
repeated BundleProfileLang bundleProfileLang = 19 [json_name = "bundleProfileLang"];
int32 imgOption = 20 [json_name = "imgOption"];
string fontColor = 21 [json_name = "fontColor"];
int64 bundleType = 22 [json_name = "bundleType"];
int64 payLaterTime = 23 [json_name = "payLaterTime"]; //
string payLaterContract = 7 [json_name = "payLaterContract"];
string language = 8 [json_name = "language"];
string createdAt = 9 [json_name = "createdAt"];
string updatedAt = 10 [json_name = "updatedAt"];
string companySign = 11 [json_name = "companySign"];
int64 contractDuration = 12 [json_name = "contractDuration"];
string bundleCommonUid = 13 [json_name = "bundleCommonUid"];
int64 sort = 14 [json_name = "sort"];
string bgImg1 = 15 [json_name = "bgImg1"];
string bgImg2 = 16 [json_name = "bgImg2"];
int64 shelfStatus = 17 [json_name = "shelfStatus"]; // 1 2
repeated SelectValueAddService selectValueAddService = 18 [json_name = "SelectValueAddService"];
repeated SelectValueAdditionalService selectValueAdditionalService = 19 [json_name = "SelectValueAdditionalService"];
repeated BundleProfileLang bundleProfileLang = 20 [json_name = "bundleProfileLang"];
int32 imgOption = 21 [json_name = "imgOption"];
string fontColor = 22 [json_name = "fontColor"];
int64 bundleType = 23 [json_name = "bundleType"];
int64 payLaterTime = 24 [json_name = "payLaterTime"]; //
}
message BundleProfileLang {
string uuid = 1 [json_name = "uuid"];

File diff suppressed because it is too large Load Diff