Merge branch 'jdshop' of e.coding.net:rosydev/jx-callback into jdshop
This commit is contained in:
@@ -6369,11 +6369,16 @@ func SingleBindTaoVegetable(ctx *jxcontext.Context, bind []TaoBindInfo) (error,
|
|||||||
VendorStoreID: v.VendorStoreID,
|
VendorStoreID: v.VendorStoreID,
|
||||||
}
|
}
|
||||||
//跟美团同步 平台调价、调价套餐
|
//跟美团同步 平台调价、调价套餐
|
||||||
if localStore, err := dao.GetStoreDetail(dao.GetDB(), utils.Str2Int(storeID), model.VendorIDMTWM, ""); err == nil {
|
var (
|
||||||
if localStore.PricePercentage != 0 {
|
cond = map[string]interface{}{
|
||||||
storeMap.PricePercentage = localStore.PricePercentage
|
model.FieldStoreID: storeID,
|
||||||
|
model.FieldVendorID: model.VendorIDMTWM,
|
||||||
}
|
}
|
||||||
//else if localStore.priceper
|
tempMaps []*model.StoreMap
|
||||||
|
)
|
||||||
|
if err := dao.GetEntitiesByKV(db, &tempMaps, cond, false); err == nil && len(tempMaps) > 0 {
|
||||||
|
storeMap.PricePercentage = tempMaps[0].PricePercentage
|
||||||
|
storeMap.PricePercentagePack = tempMaps[0].PricePercentagePack
|
||||||
}
|
}
|
||||||
storeMaps = append(storeMaps, storeMap)
|
storeMaps = append(storeMaps, storeMap)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1173,6 +1173,8 @@ func GetStoresSkusNew(ctx *jxcontext.Context, storeIDs, skuIDs []int, upcs []str
|
|||||||
sql += " , t4.unit_price DESC LIMIT 99"
|
sql += " , t4.unit_price DESC LIMIT 99"
|
||||||
}
|
}
|
||||||
var tmpList []*tGetStoresSkusInfo
|
var tmpList []*tGetStoresSkusInfo
|
||||||
|
globals.SugarLogger.Debugf("GetStoresSkusNew sql=%s,sqlParams=%s", sql, sqlParams)
|
||||||
|
|
||||||
if err = dao.GetRowsTx(txDB, &tmpList, sql, sqlParams...); err != nil {
|
if err = dao.GetRowsTx(txDB, &tmpList, sql, sqlParams...); err != nil {
|
||||||
dao.Rollback(db, txDB)
|
dao.Rollback(db, txDB)
|
||||||
return nil, err
|
return nil, err
|
||||||
@@ -1182,6 +1184,7 @@ func GetStoresSkusNew(ctx *jxcontext.Context, storeIDs, skuIDs []int, upcs []str
|
|||||||
}
|
}
|
||||||
dao.Commit(db, txDB)
|
dao.Commit(db, txDB)
|
||||||
storeNameMap := make(map[int64]*dao.StoreSkuNameExt)
|
storeNameMap := make(map[int64]*dao.StoreSkuNameExt)
|
||||||
|
globals.SugarLogger.Debugf("GetStoresSkusNew tmpList=%s", utils.Format4Output(tmpList, false))
|
||||||
for _, v := range tmpList {
|
for _, v := range tmpList {
|
||||||
var storeName *dao.StoreSkuNameExt
|
var storeName *dao.StoreSkuNameExt
|
||||||
index := jxutils.Combine2Int(v.StoreID, v.ID)
|
index := jxutils.Combine2Int(v.StoreID, v.ID)
|
||||||
|
|||||||
Reference in New Issue
Block a user