- order by sku spec in SyncSku

This commit is contained in:
gazebo
2019-01-18 17:30:14 +08:00
parent 2169484361
commit 870dc9cc8c

View File

@@ -266,7 +266,7 @@ func (v *VendorSync) SyncSku(ctx *jxcontext.Context, db *dao.DaoDB, nameID, skuI
SELECT *
FROM sku
WHERE name_id = ? AND %s_sync_status <> 0
ORDER BY updated_at, id
ORDER BY IF(spec_unit IN('kg', 'L'), 1000, 1) * spec_quality
`, dbField), skuName.ID); err == nil && len(skuList) > 0 {
for _, sku := range skuList {
syncStatus := jxutils.GetObjFieldByName(sku, syncStatusFieldName).(int8)