This commit is contained in:
邹宗楠
2022-12-29 10:11:44 +08:00
parent fe77a22a2d
commit 359e8d2db5
6 changed files with 3 additions and 12 deletions

View File

@@ -42,18 +42,14 @@ func (c *DeliveryHandler) CreateStore(ctx *jxcontext.Context, storeDetail *dao.S
}
func (c *DeliveryHandler) GetStore(ctx *jxcontext.Context, storeID int, vendorStoreID string) (storeDetail *dao.StoreDetail2, err error) {
globals.SugarLogger.Debugf("storeID=======%d vendorStoreID==========%s", storeID, vendorStoreID)
relInfo, err := dao.GetStoreDetailForDD(dao.GetDB(), storeID, model.VendorIDDD, vendorStoreID, "")
if err != nil {
return nil, errors.New("获取抖音平台账号信息失败,请重试")
}
globals.SugarLogger.Debugf("relInfo=========%s", utils.Format4Output(relInfo, false))
apiObj := getAPI(relInfo.VendorOrgCode)
globals.SugarLogger.Debugf("relInfo.VendorOrgCode===========%s,apiObj=============%v", relInfo.VendorOrgCode, apiObj)
if storeInfo, err := apiObj.GetStoreDetail(&shop_getStoreDetail_request.ShopGetStoreDetailParam{
StoreId: vendorStoreID,
}); err == nil {
globals.SugarLogger.Debugf("DYPS GetStore storeInfo=====%s", utils.Format4Output(storeInfo, false))
storeDetail = &dao.StoreDetail2{
Store: model.Store{
Name: storeInfo.StoreDetail.Store.Name,