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

@@ -184,7 +184,7 @@ func (g *RemoteGrainGRPC) Apply(content interface{}, isReplay bool) (*CartGrain,
}
// Reconstruct a lightweight CartGrain (only fields we expose internally)
grain := &CartGrain{
Id: ToCartId(state.CartId),
Id: ToCartId(state.Id),
TotalPrice: state.TotalPrice,
TotalTax: state.TotalTax,
TotalDiscount: state.TotalDiscount,
@@ -201,11 +201,11 @@ func (g *RemoteGrainGRPC) Apply(content interface{}, isReplay bool) (*CartGrain,
storeId := toPtr(it.StoreId)
grain.Items = append(grain.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,
@@ -217,7 +217,7 @@ func (g *RemoteGrainGRPC) Apply(content interface{}, isReplay bool) (*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,
@@ -231,8 +231,8 @@ func (g *RemoteGrainGRPC) Apply(content interface{}, isReplay bool) (*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))
}
grain.Deliveries = append(grain.Deliveries, &CartDelivery{
@@ -266,7 +266,7 @@ func (g *RemoteGrainGRPC) GetCurrentState() (*CartGrain, error) {
return nil, fmt.Errorf("state reply missing state on success")
}
grain := &CartGrain{
Id: ToCartId(state.CartId),
Id: ToCartId(state.Id),
TotalPrice: state.TotalPrice,
TotalTax: state.TotalTax,
TotalDiscount: state.TotalDiscount,
@@ -282,11 +282,11 @@ func (g *RemoteGrainGRPC) GetCurrentState() (*CartGrain, error) {
storeId := toPtr(it.StoreId)
grain.Items = append(grain.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,
@@ -298,7 +298,7 @@ func (g *RemoteGrainGRPC) GetCurrentState() (*CartGrain, error) {
Category4: it.Category4,
Category5: it.Category5,
Image: it.Image,
ArticleType: it.ArticleType,
ArticleType: it.Type,
SellerId: it.SellerId,
SellerName: it.SellerName,
Disclaimer: it.Disclaimer,
@@ -311,8 +311,8 @@ func (g *RemoteGrainGRPC) GetCurrentState() (*CartGrain, error) {
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))
}
grain.Deliveries = append(grain.Deliveries, &CartDelivery{