Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -772,14 +772,13 @@ WHERE mmitem_id = ANY($1::bigint[])
|
||||
if !v1.Valid || v1.Int64 <= 0 {
|
||||
continue
|
||||
}
|
||||
// Variant key in this installation: (val1=color, val3=itemdim3_if_any). Ignore val2 (size).
|
||||
d1 := v1.Int64
|
||||
|
||||
d3k := int64(0)
|
||||
// Variant key in this app is (val1, val2). val3 may exist but is not the second axis for matching.
|
||||
_ = mmdimID
|
||||
_ = v3
|
||||
if v2.Valid && v2.Int64 > 0 {
|
||||
d3k = v2.Int64
|
||||
_ = v2
|
||||
d3k := int64(0)
|
||||
if v3.Valid && v3.Int64 > 0 {
|
||||
d3k = v3.Int64
|
||||
}
|
||||
|
||||
code := strings.TrimSpace(itemToCode[itemID])
|
||||
@@ -886,7 +885,7 @@ ORDER BY dim_id, updated_at DESC;
|
||||
}
|
||||
|
||||
// Map Nebim tokens to PG integer ids (dimval1 namespace).
|
||||
// This app uses key: dim1=<color>, dim3=<size> to match mmitem_dim (val1,val2).
|
||||
// This app uses key: dim1=<color>, dim3=<itemdim3> to match mmitem_dim (val1,val3).
|
||||
d1 := int64(0)
|
||||
if id, ok := resolveDimID("dimval1", colorCode); ok {
|
||||
d1 = id
|
||||
@@ -895,7 +894,7 @@ ORDER BY dim_id, updated_at DESC;
|
||||
continue
|
||||
}
|
||||
d3k := int64(0)
|
||||
if id, ok := resolveDimID("dimval1", dim1Code); ok {
|
||||
if id, ok := resolveDimID("dimval1", dim3Code); ok {
|
||||
d3k = id
|
||||
}
|
||||
key := fmt.Sprintf("%d|%d|%d", itemID, d1, d3k)
|
||||
|
||||
Reference in New Issue
Block a user