Merge remote-tracking branch 'origin/master'

This commit is contained in:
M_Kececi
2026-06-19 12:49:49 +03:00
parent c8c37b4e69
commit 3732004a29
2 changed files with 57 additions and 48 deletions

View File

@@ -568,19 +568,13 @@ DO UPDATE SET dim_id = EXCLUDED.dim_id, updated_at = EXCLUDED.updated_at
if id, ok := resolveDimvalFromToken(pgTx, "dimval1", colorCode); ok {
d1 = id
resolvedDim1++
} else if id, ok := resolveDimvalFromToken(pgTx, "dimval1", dim3Code); ok {
d1 = id
resolvedDim1++
} else if id, ok := resolveDimvalFromToken(pgTx, "dimval1", dim1Code); ok {
d1 = id
resolvedDim1++
}
if d1 <= 0 {
continue
}
var d3 sql.NullInt64
// dim3 corresponds to mmitem_dim.val3.
if id, ok := resolveDimvalFromToken(pgTx, "dimval1", dim3Code); ok {
if id, ok := resolveDimvalFromToken(pgTx, "dimval3", dim3Code); ok {
d3 = sql.NullInt64{Int64: id, Valid: true}
resolvedDim3++
}
@@ -620,7 +614,7 @@ DO UPDATE SET dim_id = EXCLUDED.dim_id, updated_at = EXCLUDED.updated_at
continue
}
var v2any any = nil
// Active key: val1=color, val3=itemdim3. val2 is size and is not part of price/campaign key.
// Active key: val1=color, val3=ItemDim2Code/yaka. val2 is size and is not part of price/campaign key.
v3 := int64(0)
if c.Dim3.Valid && c.Dim3.Int64 > 0 {
v3 = c.Dim3.Int64