Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -777,17 +777,22 @@ DO UPDATE SET dim_id = EXCLUDED.dim_id, updated_at = EXCLUDED.updated_at
|
||||
}
|
||||
|
||||
d1 := int64(0)
|
||||
// Resolve dim1: prefer ColorCode first (matches e-comm expectation: dim1=Color).
|
||||
if id, ok := resolveDimID("dimval1", colorCode); ok {
|
||||
// IMPORTANT: In this Nebim setup, both ItemDim1Code and ItemDim3Code are mapped in PG as dimval1 ids.
|
||||
// We therefore resolve both axes via dimval1 and store the second axis in dim3 (still a bigint).
|
||||
if id, ok := resolveDimID("dimval1", dim1Code); ok {
|
||||
d1 = id
|
||||
} else if id, ok := resolveDimID("dimval1", dim1Code); ok {
|
||||
} else if id, ok := resolveDimID("dimval1", dim3Code); ok {
|
||||
d1 = id
|
||||
} else if id, ok := resolveDimID("dimval1", colorCode); ok {
|
||||
d1 = id
|
||||
}
|
||||
if d1 <= 0 {
|
||||
continue
|
||||
}
|
||||
d3k := int64(0)
|
||||
if id, ok := resolveDimID("dimval3", t3); ok {
|
||||
if id, ok := resolveDimID("dimval1", dim3Code); ok {
|
||||
d3k = id
|
||||
} else if id, ok := resolveDimID("dimval1", colorCode); ok {
|
||||
d3k = id
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user