change layout
CI / changes (push) Successful in 5s
CI / docker-bff (push) Failing after 7s
CI / docker-product (push) Failing after 5s
CI / docker-admin (push) Failing after 4s
CI / docker-user (push) Failing after 6s

This commit is contained in:
2026-08-20 15:41:44 +08:00
parent 57e04be304
commit be8f89f449
176 changed files with 7009 additions and 4498 deletions
@@ -0,0 +1,52 @@
package logic
import (
product "lone-services/rpc/product/pb"
"lone-services/services/product/internal/dao"
"time"
)
func toProductItem(row dao.ProductInfo) *product.Item {
publishTime := ""
if !row.PublishTime.IsZero() {
publishTime = row.PublishTime.Format(time.DateTime)
}
return &product.Item{
Id: int64(row.Id),
Name: row.Name,
Subhead: row.Subhead,
Content: row.Content,
ModelCode: row.ModelCode,
Price: float64(row.Price),
StorePrice: float64(row.StorePrice),
SalePrice: float64(row.SalePrice),
SharePrice: float64(row.SharePrice),
AgentPrice: float64(row.AgentPrice),
SaleReward: row.SaleReward,
SalesModel: uint32(row.SalesModel),
Waybill: row.Waybill,
Status: uint32(row.Status),
Weight: float64(row.Weight),
IsIndex: uint32(row.IsIndex),
IndexImage: row.IndexImage,
Cubage: row.Cubage,
Label: row.Label,
Images: row.Images,
IsBuy: uint32(row.IsBuy),
PeriodValidity: int32(row.PeriodValidity),
PublishTime: publishTime,
Type: uint32(row.Type),
NormsNumber: uint32(row.NormsNumber),
BoxNumber: row.BoxNumber,
Sort: uint32(row.Sort),
Number: uint32(row.Number),
VerifyStatus: uint32(row.VerifyStatus),
VerifyId: int64(row.VerifyId),
VerifyName: row.VerifyName,
VerifySecondId: int64(row.VerifySecondId),
VerifySecondName: row.VerifySecondName,
Reason: row.Reason,
AdminName: row.AdminName,
Edit: uint32(row.Edit),
}
}