1
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user