1
This commit is contained in:
@@ -255,8 +255,7 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
||||
JOIN store_map t2 ON t1.id = t2.store_id AND t2.vendor_id = ? AND (t2.deleted_at = ?)
|
||||
LEFT JOIN brand t3 ON t3.id = t1.brand_id
|
||||
WHERE t1.id = ?
|
||||
ORDER BY t2.updated_at
|
||||
`
|
||||
ORDER BY t2.updated_at`
|
||||
if err = dao.GetRows(db, &stores, sql, model.VendorIDEBAI, utils.DefaultTimeValue, storeID); err == nil {
|
||||
for _, store := range stores {
|
||||
if globals.EnableEbaiStoreWrite {
|
||||
@@ -264,7 +263,7 @@ func (p *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin
|
||||
if store.SyncStatus&model.SyncFlagDeletedMask == 0 {
|
||||
shopID = store.ID
|
||||
}
|
||||
store2, err2 := p.ReadStore(jxcontext.AdminCtx, store.VendorOrgCode, store.VendorStoreID,"")
|
||||
store2, err2 := p.ReadStore(jxcontext.AdminCtx, store.VendorOrgCode, store.VendorStoreID, "")
|
||||
// globals.SugarLogger.Debugf("ebai UpdateStore2 store2:%s, err2:%v", utils.Format4Output(store2, true), err2)
|
||||
if err = err2; err == nil {
|
||||
if store2.ID == store.ID {
|
||||
|
||||
@@ -3,19 +3,16 @@ package ebai
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
)
|
||||
|
||||
func TestReadStore(t *testing.T) {
|
||||
result, err := CurPurchaseHandler.ReadStore(jxcontext.AdminCtx, "", testShopBaiduID)
|
||||
if err != nil {
|
||||
t.Fatal(err.Error())
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
//func TestReadStore(t *testing.T) {
|
||||
// result, err := CurPurchaseHandler.ReadStore(jxcontext.AdminCtx, "", testShopBaiduID)
|
||||
// if err != nil {
|
||||
// t.Fatal(err.Error())
|
||||
// }
|
||||
// t.Log(utils.Format4Output(result, false))
|
||||
//}
|
||||
|
||||
func TestUpdateStore(t *testing.T) {
|
||||
db := dao.GetDB()
|
||||
|
||||
Reference in New Issue
Block a user