This commit is contained in:
邹宗楠
2023-10-11 11:42:27 +08:00
parent 553a226cba
commit 72f0b2358a
5 changed files with 19 additions and 4 deletions

View File

@@ -3,6 +3,7 @@ package tao_vegetable
import (
"fmt"
"git.rosy.net.cn/baseapi/platformapi/tao_vegetable"
"git.rosy.net.cn/jx-callback/business/model/dao"
"strings"
"sync"
@@ -219,5 +220,19 @@ func getAPI(appOrgCode string, storeID int, vendorStoreID string) (apiObj *tao_v
} else {
apiObj = nil
}
if apiObj != nil {
if storeID != model.NO {
storeMap, _ := dao.GetStoreDetail(dao.GetDB(), storeID, model.VendorIDTaoVegetable, "")
if storeMap.MtwmToken != "" {
apiObj.SetToken(storeMap.MtwmToken)
}
} else if vendorStoreID != "" {
storeMap, _ := dao.GetStoreDetailForDD(dao.GetDB(), 0, model.VendorIDTaoVegetable, vendorStoreID, "")
if storeMap.MtwmToken != "" {
apiObj.SetToken(storeMap.MtwmToken)
}
}
}
return apiObj
}