aa
This commit is contained in:
@@ -266,13 +266,13 @@ var (
|
|||||||
|
|
||||||
func GetStoresSkusForStore(ctx *jxcontext.Context, storeID int, isFocus, isAct bool, keyword string, categoryID, status, offset, pageSize int) (skuNamesInfo *dao.StoreSkuNamesInfo, err error) {
|
func GetStoresSkusForStore(ctx *jxcontext.Context, storeID int, isFocus, isAct bool, keyword string, categoryID, status, offset, pageSize int) (skuNamesInfo *dao.StoreSkuNamesInfo, err error) {
|
||||||
//权限
|
//权限
|
||||||
if permission.IsRoled(ctx) {
|
//if permission.IsRoled(ctx) {
|
||||||
if storeIDsMap, err := permission.GetUserStoresResultMap(ctx.GetUserID()); err == nil {
|
// if storeIDsMap, err := permission.GetUserStoresResultMap(ctx.GetUserID()); err == nil {
|
||||||
if storeIDsMap[storeID] == 0 {
|
// if storeIDsMap[storeID] == 0 {
|
||||||
return skuNamesInfo, err
|
// return skuNamesInfo, err
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
var (
|
var (
|
||||||
sqlParams []interface{}
|
sqlParams []interface{}
|
||||||
db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
|
|||||||
@@ -1923,7 +1923,19 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
|||||||
// dao.UpdateEntity(db, v, "ConsigneeMobile2")
|
// dao.UpdateEntity(db, v, "ConsigneeMobile2")
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
cms.RefreshPageStore()
|
//var (
|
||||||
|
// db = dao.GetDB()
|
||||||
|
// mtStoreID = "11655829"
|
||||||
|
// mtOrgCode = "589"
|
||||||
|
// jdStoreID = "12116911"
|
||||||
|
// jdOrgCode = "364133"
|
||||||
|
//)
|
||||||
|
////获取token
|
||||||
|
//mtapi := mtwm.GetAPI(mtOrgCode, mtStoreID)
|
||||||
|
//if token, err := mtapi.GetAccessToken2(storeMap.VendorStoreID); err == nil && token != nil {
|
||||||
|
// storeMap.MtwmToken = token.AccessToken
|
||||||
|
// storeMap.MtwmRefreshToken = token.RefreshToken
|
||||||
|
//}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -226,6 +226,21 @@ func (p *PurchaseHandler) getUploadImgPoiCode() (poiCode string) {
|
|||||||
return poiCode
|
return poiCode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func GetAPI(appOrgCode string, vendorStoreID string) (apiObj *mtwmapi.API) {
|
||||||
|
if appOrgCode == "" {
|
||||||
|
globals.SugarLogger.Debugf("getAPI appOrgCode is empty")
|
||||||
|
}
|
||||||
|
apiObj = partner.CurAPIManager.GetAPI(model.VendorIDMTWM, appOrgCode).(*mtwmapi.API)
|
||||||
|
if appOrgCode == globals.Mtwm2Code {
|
||||||
|
var storeDetail *dao.StoreDetail
|
||||||
|
storeDetail, _ = dao.GetStoreDetailByVendorStoreID(dao.GetDB(), vendorStoreID, model.VendorIDMTWM, appOrgCode)
|
||||||
|
if storeDetail != nil {
|
||||||
|
apiObj.SetToken(storeDetail.MtwmToken)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return apiObj
|
||||||
|
}
|
||||||
|
|
||||||
func getAPI(appOrgCode string, storeID int, vendorStoreID string) (apiObj *mtwmapi.API) {
|
func getAPI(appOrgCode string, storeID int, vendorStoreID string) (apiObj *mtwmapi.API) {
|
||||||
if appOrgCode == "" {
|
if appOrgCode == "" {
|
||||||
globals.SugarLogger.Debugf("getAPI appOrgCode is empty")
|
globals.SugarLogger.Debugf("getAPI appOrgCode is empty")
|
||||||
|
|||||||
Reference in New Issue
Block a user