update propertynames
All checks were successful
Build and Publish / Metadata (push) Successful in 4s
Build and Publish / BuildAndDeployAmd64 (push) Successful in 49s
Build and Publish / BuildAndDeployArm64 (push) Successful in 3m56s

This commit is contained in:
matst80
2025-10-10 14:43:51 +00:00
parent 30c89a0394
commit 09a68db8d5
4 changed files with 136 additions and 124 deletions

View File

@@ -32,11 +32,11 @@ func ToCartState(c *CartGrain) *messages.CartState {
items = append(items, &messages.CartItemState{
Id: int64(it.Id),
SourceItemId: int64(it.ItemId),
ItemId: int64(it.ItemId),
Sku: it.Sku,
Name: it.Name,
UnitPrice: it.Price,
Quantity: int32(it.Quantity),
Price: it.Price,
Qty: int32(it.Quantity),
TotalPrice: it.TotalPrice,
TotalTax: it.TotalTax,
OrgPrice: it.OrgPrice,
@@ -49,7 +49,7 @@ func ToCartState(c *CartGrain) *messages.CartState {
Category4: it.Category4,
Category5: it.Category5,
Image: it.Image,
ArticleType: it.ArticleType,
Type: it.ArticleType,
SellerId: it.SellerId,
SellerName: it.SellerName,
Disclaimer: it.Disclaimer,
@@ -84,13 +84,13 @@ func ToCartState(c *CartGrain) *messages.CartState {
Id: int64(d.Id),
Provider: d.Provider,
Price: d.Price,
ItemIds: itemIds,
Items: itemIds,
PickupPoint: pp,
})
}
return &messages.CartState{
CartId: c.Id.String(),
Id: c.Id.String(),
Items: items,
TotalPrice: c.TotalPrice,
TotalTax: c.TotalTax,
@@ -111,7 +111,7 @@ func FromCartState(cs *messages.CartState, g *CartGrain) *CartGrain {
if g == nil {
g = &CartGrain{}
}
g.Id = ToCartId(cs.CartId)
g.Id = ToCartId(cs.Id)
g.TotalPrice = cs.TotalPrice
g.TotalTax = cs.TotalTax
g.TotalDiscount = cs.TotalDiscount
@@ -129,11 +129,11 @@ func FromCartState(cs *messages.CartState, g *CartGrain) *CartGrain {
storeId := toPtr(it.StoreId)
g.Items = append(g.Items, &CartItem{
Id: int(it.Id),
ItemId: int(it.SourceItemId),
ItemId: int(it.ItemId),
Sku: it.Sku,
Name: it.Name,
Price: it.UnitPrice,
Quantity: int(it.Quantity),
Price: it.Price,
Quantity: int(it.Qty),
TotalPrice: it.TotalPrice,
TotalTax: it.TotalTax,
OrgPrice: it.OrgPrice,
@@ -145,7 +145,7 @@ func FromCartState(cs *messages.CartState, g *CartGrain) *CartGrain {
Category4: it.Category4,
Category5: it.Category5,
Image: it.Image,
ArticleType: it.ArticleType,
ArticleType: it.Type,
SellerId: it.SellerId,
SellerName: it.SellerName,
Disclaimer: it.Disclaimer,
@@ -165,8 +165,9 @@ func FromCartState(cs *messages.CartState, g *CartGrain) *CartGrain {
if d == nil {
continue
}
intIds := make([]int, 0, len(d.ItemIds))
for _, id := range d.ItemIds {
intIds := make([]int, 0, len(d.Items))
for _, id := range d.Items {
intIds = append(intIds, int(id))
}
var pp *messages.PickupPoint