Compare commits

..

No commits in common. "1a4d3224a199e7ec10444b0b69cca98b2b982925" and "5e17ed3890e4416fbe3c4e8ef43e7dc00ba70483" have entirely different histories.

View File

@ -94,7 +94,6 @@ func BuildServiceRecords(req *bundle.OrderCreateRecord, bundleDetail *bundle.Bun
expirationDay string
addUidService = make(map[string]bool)
bundleUidService = make(map[string]bool)
foundExpiration = false
)
// 分类权益
@ -150,15 +149,12 @@ func BuildServiceRecords(req *bundle.OrderCreateRecord, bundleDetail *bundle.Bun
addRecords = append(addRecords, buildAddRecord(addService, uid, 0, num, 1))
// 计算到期时间
if !foundExpiration && addService.ServiceType == 5 {
if addService.ServiceType == 5 {
expirationDay = calculateExpirationDate(time.Now(), num, addService.Unit)
foundExpiration = true
} else {
expirationDay = time.Now().AddDate(0, 0, 7).Format("2006-01-02")
}
}
// 如果没有找到服务类型为5的使用默认值
if !foundExpiration {
expirationDay = time.Now().AddDate(0, 0, 7).Format("2006-01-02")
}
return addRecords, addTotalPrice, expirationDay, nil
}