aa
This commit is contained in:
@@ -18,8 +18,10 @@ import (
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/authz"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/mtwmapi"
|
||||
"git.rosy.net.cn/baseapi/platformapi/yinbaoapi"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/globals/api/apimanager"
|
||||
"git.rosy.net.cn/jx-callback/globals/refutil"
|
||||
|
||||
"github.com/360EntSecGroup-Skylar/excelize"
|
||||
@@ -1278,13 +1280,13 @@ func AddStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, vendorID int, vend
|
||||
} else if vendorID == model.VendorIDMTWM {
|
||||
//如果是绑的美团超市,要去更新token
|
||||
if outStoreMap.VendorOrgCode == globals.Mtwm2Code {
|
||||
// mtapi := apimanager.CurAPIManager.GetAPI(model.VendorIDMTWM, outStoreMap.VendorOrgCode).(*mtwmapi.API)
|
||||
// if result, err := mtapi.GetOAuthCode(outStoreMap.VendorStoreID); result != nil && err == nil {
|
||||
// if token, err := mtapi.GetAccessToken(result.(string)); err == nil && token != nil {
|
||||
// outStoreMap.MtwmToken = token.(string)
|
||||
// dao.UpdateEntity(db, outStoreMap, "MtwmToken")
|
||||
// }
|
||||
// }
|
||||
mtapi := apimanager.CurAPIManager.GetAPI(model.VendorIDMTWM, outStoreMap.VendorOrgCode).(*mtwmapi.API)
|
||||
if result, err := mtapi.GetOAuthCode(outStoreMap.VendorStoreID); result != nil && err == nil {
|
||||
if token, err := mtapi.GetAccessToken(result.(string)); err == nil && token != nil {
|
||||
outStoreMap.MtwmToken = token.(string)
|
||||
dao.UpdateEntity(db, outStoreMap, "MtwmToken")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if globals.IsAddEvent {
|
||||
|
||||
Reference in New Issue
Block a user