- handle sale city in Change2JDSPU4Store.

This commit is contained in:
gazebo
2019-01-05 14:14:14 +08:00
parent a4a772b373
commit f5f0a9ad88

View File

@@ -342,7 +342,10 @@ func Change2JDSPU4Store(ctx *jxcontext.Context, storeIDs []int, isAsync, isConti
SELECT NOW(), NOW(), ?, ?, t1.store_id, t2.id, t1.price, t1.unit_price, t1.status , 0, 0, ?, ?, ?
FROM store_sku_bind t1
JOIN sku t2 ON t2.link_id = t1.sku_id AND t2.deleted_at = ?
WHERE t1.deleted_at = ?
JOIN store t3 ON t3.id = t1.store_id
JOIN sku_name t4 ON t3.id = t2.name_id
LEFT JOIN sku_name_place_bind t5 ON t5.place_code = t3.city_code AND t5.name_id = t4.id
WHERE t1.deleted_at = ? AND (t4.is_global = 1 OR t5.id IS NOT NULL)
`
sqlParams = []interface{}{
ctx.GetUserName(),