- fix bug in jxutils.ComposeSkuName
- mtwm SyncStoreSkus almost ok
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
)
|
||||
|
||||
type SkuStoreCatInfo struct {
|
||||
@@ -88,6 +87,7 @@ func GetStoreCategories(db *DaoDB, vendorID, storeID int, level int) (cats []*St
|
||||
}
|
||||
|
||||
type StoreSkuSyncInfo struct {
|
||||
BindID int `orm:"column(bind_id)"`
|
||||
Price int64
|
||||
UnitPrice int64
|
||||
StoreSkuStatus int
|
||||
@@ -109,7 +109,7 @@ type StoreSkuSyncInfo struct {
|
||||
|
||||
func GetStoreSkus(db *DaoDB, vendorID, storeID int, skuIDs []int) (skus []*StoreSkuSyncInfo, err error) {
|
||||
sql := `
|
||||
SELECT t1.price, t1.unit_price, t1.status store_sku_status, t1.%s_id, t1.%s_sync_status sku_sync_status,
|
||||
SELECT t1.id bind_id, t1.price, t1.unit_price, t1.status store_sku_status, t1.%s_id, t1.%s_sync_status sku_sync_status,
|
||||
t2.*,
|
||||
t3.prefix, t3.name, t3.unit, t3.img,
|
||||
t4.%s_category_id vendor_vendor_cat_id,
|
||||
@@ -134,7 +134,7 @@ func GetStoreSkus(db *DaoDB, vendorID, storeID int, skuIDs []int) (skus []*Store
|
||||
}
|
||||
filedPrefix := ConvertDBFieldPrefix(model.VendorNames[vendorID])
|
||||
sql = fmt.Sprintf(sql, filedPrefix, filedPrefix, filedPrefix, filedPrefix, filedPrefix, filedPrefix, filedPrefix, filedPrefix)
|
||||
globals.SugarLogger.Debug(sql)
|
||||
// globals.SugarLogger.Debug(sql)
|
||||
if err = GetRows(db, &skus, sql, sqlParams...); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user