1
This commit is contained in:
@@ -2,7 +2,6 @@ package ebaiapi
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
@@ -250,7 +249,6 @@ func (a *API) ShopCategoryGet(shopID string) (cats []*CategoryInfo, err error) {
|
||||
return cats, nil
|
||||
}
|
||||
}
|
||||
globals.SugarLogger.Debugf("ShopCategoryGet err====%v", err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -316,7 +314,6 @@ func (a *API) SkuCreate(trackInfo, shopID string, customSkuID int64, params map[
|
||||
if err == nil && result.Data != nil {
|
||||
return utils.Interface2Int64WithDefault(result.Data.(map[string]interface{})[KeySkuID], 0), nil
|
||||
}
|
||||
globals.SugarLogger.Debugf("SkuCreate err====%v", err)
|
||||
return 0, err
|
||||
}
|
||||
|
||||
@@ -329,7 +326,6 @@ func (a *API) SkuUpdate(trackInfo, shopID string, ebaiSkuID int64, params map[st
|
||||
if err == nil {
|
||||
return utils.Interface2Int64WithDefault(result.Data.(map[string]interface{})[KeySkuID], 0), nil
|
||||
}
|
||||
globals.SugarLogger.Debugf("SkuUpdate err====%v", err)
|
||||
return 0, err
|
||||
}
|
||||
|
||||
|
||||
@@ -216,8 +216,6 @@ func TestStringTo(t *testing.T) {
|
||||
globals.SugarLogger.Debugf("==============err := %s", err.Error())
|
||||
}
|
||||
|
||||
globals.SugarLogger.Debugf("=data :=%s", utils.Format4Output(result0, false))
|
||||
|
||||
}
|
||||
|
||||
func TestDecode(t *testing.T) {
|
||||
|
||||
@@ -4,7 +4,6 @@ package jdapi
|
||||
import (
|
||||
"encoding/json"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -338,8 +337,6 @@ func (a *API) GetStoreInfoByStationNo2(storeNo string) (storeDetail *StoreDetail
|
||||
// }
|
||||
|
||||
func (a *API) UpdateStoreInfo4Open2(updateParams *OpStoreParams, modifyCloseStatus bool) (err error) {
|
||||
globals.SugarLogger.Debugf("=updateParams=========: %s", utils.Format4Output(updateParams, false))
|
||||
globals.SugarLogger.Debugf("=modifyCloseStatus=========: %s", utils.Format4Output(modifyCloseStatus, false))
|
||||
updateParams.Operator = utils.GetAPIOperator(updateParams.Operator)
|
||||
mapData := utils.Struct2MapByJson(updateParams)
|
||||
if !modifyCloseStatus {
|
||||
@@ -360,7 +357,6 @@ func (a *API) UpdateStoreInfo4Open2(updateParams *OpStoreParams, modifyCloseStat
|
||||
delete(mapData, "serviceTimeEnd1")
|
||||
}
|
||||
_, err = a.AccessAPINoPage("store/updateStoreInfo4Open", mapData, nil, nil, nullResultParser)
|
||||
globals.SugarLogger.Debugf("=err=========: %s", utils.Format4Output(err, false))
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -401,6 +397,17 @@ func (a *API) OrgReplyComment(orderID int64, storeID, content, replayPin string)
|
||||
return err
|
||||
}
|
||||
|
||||
// 根据城市编码查询区域信息列表接口
|
||||
// https://opendj.jd.com/staticnew/widgets/resources.html?groupid=194&apiid=cc2a3b5d49e84f3eb41ee39a0afe33c3
|
||||
func (a *API) GetNextLevelByType(areaCode int64, pin string) (interface{}, error) {
|
||||
jdParams := map[string]interface{}{
|
||||
"areaCode": areaCode,
|
||||
"pin": pin,
|
||||
}
|
||||
result, err := a.AccessAPI("address/getNextLevelByType", jdParams)
|
||||
return result, err
|
||||
}
|
||||
|
||||
// 根据到家门店编码修改商家自动接单接口
|
||||
// https://opendj.jd.com/staticnew/widgets/resources.html?groupid=194&apiid=5df446bb5ff14413965b8d702718dc48
|
||||
func (a *API) UpdateStoreConfig4Open(stationNo string, isAutoOrder bool) (bool, error) {
|
||||
|
||||
@@ -51,26 +51,21 @@ func TestGetStoreInfoByStationNo(t *testing.T) {
|
||||
|
||||
func TestUpdateStoreInfo4Open(t *testing.T) {
|
||||
params := &OpStoreParams{
|
||||
StationNo: "12664100",
|
||||
StationName: "",
|
||||
OutSystemID: "",
|
||||
Mobile: "",
|
||||
Phone: "",
|
||||
Lat: 43.622098,
|
||||
Lng: 122.275918,
|
||||
StationAddress: "内蒙古自治区通辽市科尔沁区百花新城",
|
||||
Operator: "liulei",
|
||||
ServiceTimeEnd1: 0,
|
||||
ServiceTimeStart1: 0,
|
||||
ServiceTimeEnd2: 0,
|
||||
ServiceTimeStart2: 0,
|
||||
DeliveryRangeType: 0,
|
||||
CoordinateType: 0,
|
||||
DeliveryRangeRadius: 0,
|
||||
CoordinatePoints: "",
|
||||
CloseStatus: 0,
|
||||
StoreNotice: "",
|
||||
StandByPhone: "",
|
||||
StationNo: "12664100",
|
||||
StationName: "旺佳超市",
|
||||
OutSystemID: "668836",
|
||||
Mobile: "17751816719",
|
||||
Phone: "17751816719",
|
||||
Lat: 43.622098,
|
||||
Lng: 122.275918,
|
||||
City: 902,
|
||||
County: 32769,
|
||||
StationAddress: "内蒙古自治区通辽市科尔沁区百花新城",
|
||||
Operator: "18981810340",
|
||||
ServiceTimeEnd1: 44,
|
||||
ServiceTimeStart1: 14,
|
||||
CoordinateType: 3,
|
||||
CloseStatus: 0,
|
||||
}
|
||||
err := api.UpdateStoreInfo4Open2(params, false)
|
||||
if err != nil {
|
||||
@@ -79,6 +74,10 @@ func TestUpdateStoreInfo4Open(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
func TestGetNextLevelByType(t *testing.T) {
|
||||
api.GetNextLevelByType(902, "18981810")
|
||||
}
|
||||
|
||||
//func TestGetCommentByOrderId(t *testing.T) {
|
||||
// testOrderID := int64(922520919000622)
|
||||
// result, err := api.GetCommentByOrderId2(testOrderID)
|
||||
|
||||
@@ -2,7 +2,6 @@ package jdshopapi
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
)
|
||||
|
||||
//Creat by hang At 2022-03-28
|
||||
@@ -66,7 +65,6 @@ func (a *API) GetOrderById2(orderID int64, isStatus bool) (getOrderResult *GetEn
|
||||
}
|
||||
|
||||
result, err := a.AccessAPI("jingdong.pop.oto.locorderinfo.enget", prodURL2, params)
|
||||
globals.SugarLogger.Debugf("===result :%s", utils.Format4Output(result, false))
|
||||
if err == nil {
|
||||
utils.Map2StructByJson(result["jingdong_pop_order_enGet_responce"].(map[string]interface{})["orderDetailInfo"].(map[string]interface{})["orderInfo"], &getOrderResult, false)
|
||||
}
|
||||
|
||||
@@ -202,8 +202,6 @@ var errList = make([]string, 0, 0)
|
||||
// 删除商品分类
|
||||
// 当分类下存在子级分类或商品时,不允许直接删除此分类。
|
||||
func (a *API) RetailCatDelete(poiCode, code, name string) (err error) {
|
||||
globals.SugarLogger.Debugf("RetailCatDelete======poiCode %s", poiCode)
|
||||
globals.SugarLogger.Debugf("RetailCatDelete======name %s", name)
|
||||
params := map[string]interface{}{
|
||||
KeyAppPoiCode: poiCode,
|
||||
}
|
||||
@@ -226,7 +224,6 @@ func (a *API) RetailCatList(poiCode string) (retailCatList []*RetailCategoryInfo
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("RetailCatList==========err %v", err)
|
||||
}
|
||||
globals.SugarLogger.Debugf("result==========err %s", utils.Format4Output(result, false))
|
||||
|
||||
if err == nil {
|
||||
return interface2CatList(result, 1, nil), nil
|
||||
@@ -525,7 +522,6 @@ func (a *API) BatchSetRestockingPrice(trackInfo, appPoiCode string, spuData []*S
|
||||
KeyAppPoiCode: appPoiCode,
|
||||
"spu_data": spuData,
|
||||
}, resultKeyMsg, trackInfo)
|
||||
globals.SugarLogger.Debugf("BatchSetRestockingPrice retVal====%v err===========%v", retVal, err)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import (
|
||||
order_orderDetail_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/order_orderDetail/response"
|
||||
order_searchList_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/order_searchList/request"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"math"
|
||||
"time"
|
||||
)
|
||||
@@ -311,8 +310,6 @@ func (a *API) OrderDelivering(param *order_logisticsAdd_request.OrderLogisticsAd
|
||||
request.Param = param
|
||||
|
||||
result, err := request.Execute(a.accessTokenObj)
|
||||
//globals.SugarLogger.Debugf("订单发货=========:%s", request.GetUrlPath())
|
||||
//globals.SugarLogger.Debugf("订单发货:=%s", utils.Format4Output(result, false))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -467,7 +464,6 @@ func (a *API) CreateOrderCallback(orderStatus []byte) (map[string][]interface{},
|
||||
if err := json.Unmarshal([]byte(data.Data), &create); err != nil {
|
||||
return nil, CallbackResponseErr(false)
|
||||
}
|
||||
globals.SugarLogger.Debugf("CallbackShipmentInfoChange create=====%s", utils.Format4Output(create, false))
|
||||
callbackResult[CallbackShipmentInfoChange] = append(callbackResult[CallbackShipmentInfoChange], create)
|
||||
default:
|
||||
return nil, CallbackResponseErr(false)
|
||||
|
||||
@@ -30,7 +30,6 @@ import (
|
||||
superm_product_batchRedistributeStoreProduct_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_product_batchRedistributeStoreProduct/request"
|
||||
superm_product_createSubProduct_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_product_createSubProduct/request"
|
||||
superm_product_launchProduct_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_product_launchProduct/request"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"strings"
|
||||
)
|
||||
@@ -119,11 +118,9 @@ func (a *API) CreateStoreCommodity(skuParam *product_addV2_request.ProductAddV2P
|
||||
request.Param = skuParam
|
||||
result, err := request.Execute(a.accessTokenObj)
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("======CreateStoreCommodity logid: %s,%d,%d", result.LogId, skuParam.MainProductId, err.Error())
|
||||
return nil, err
|
||||
}
|
||||
if result.Code != RequestSuccessCode {
|
||||
globals.SugarLogger.Debugf("======CreateStoreCommodity logid: %s", utils.Format4Output(result, false))
|
||||
return nil, errors.New(result.SubMsg)
|
||||
}
|
||||
return result.Data, nil
|
||||
@@ -151,11 +148,9 @@ func (a *API) EditStoreCommodity(sku *product_editV2_request.ProductEditV2Param)
|
||||
|
||||
result, err := request.Execute(a.accessTokenObj)
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debugf("LogId %s ,err %s", result.LogId, err.Error())
|
||||
return err
|
||||
}
|
||||
if result.Code != RequestSuccessCode {
|
||||
globals.SugarLogger.Debugf("result err := %s", utils.Format4Output(result, false))
|
||||
return errors.New(result.SubMsg)
|
||||
}
|
||||
return nil
|
||||
@@ -525,10 +520,8 @@ func (a *API) CreateSubProduct(mainProductId int64, storeId int64) (int64, error
|
||||
}
|
||||
|
||||
if result.Code != RequestSuccessCode {
|
||||
globals.SugarLogger.Debugf("=CreateSubProduct logID ========= %s", utils.Format4Output(result, false))
|
||||
return 0, errors.New(result.SubMsg)
|
||||
}
|
||||
globals.SugarLogger.Debugf("result CreateSubProduct %s", utils.Format4Output(result, false))
|
||||
|
||||
return result.Data.SubProductId, nil
|
||||
}
|
||||
|
||||
@@ -56,8 +56,6 @@ import (
|
||||
warehouse_list_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_list/response"
|
||||
warehouse_setFence_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_setFence/request"
|
||||
warehouse_unbindStore_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/warehouse_unbindStore/request"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
)
|
||||
|
||||
//GetStoreDetail 单个获取门店信息
|
||||
@@ -221,8 +219,6 @@ func (a *API) BindStoreSaleLimit(param *shop_bindStoreSaleLimit_request.ShopBind
|
||||
request := shop_bindStoreSaleLimit_request.New()
|
||||
request.Param = param
|
||||
response, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf("门店绑定限售模板=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf("门店绑定限售模板:=%s", utils.Format4Output(response, false))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -237,8 +233,6 @@ func (a *API) StoreQuerySaleLimitTemp(storeId int64) (int64, error) {
|
||||
request := shop_getStoreSaleLimit_request.New()
|
||||
request.Param.StoreId = storeId
|
||||
result, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf("门店查询限售模板=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf("门店查询限售模板:=%s", utils.Format4Output(result, false))
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@@ -256,8 +250,6 @@ func (a *API) FreightTemplateCreate(param *freightTemplate_create_request.Freigh
|
||||
request := freightTemplate_create_request.New()
|
||||
request.Param = param
|
||||
response, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf("创建运费模板=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf("创建运费模板:=%s", utils.Format4Output(response, false))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -272,9 +264,6 @@ func (a *API) FreightTemplateUpdate(param *freightTemplate_update_request.Freigh
|
||||
request := freightTemplate_update_request.New()
|
||||
request.Param = param
|
||||
response, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf("更新运费模板=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf("更新运费模板:=%s", utils.Format4Output(response, false))
|
||||
globals.SugarLogger.Debugf("打印param 检查======%v", utils.Format4Output(request.Param, false))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -289,8 +278,6 @@ func (a *API) BindFreightTemplate(param *shop_bindStoreFreight_request.ShopBindS
|
||||
request := shop_bindStoreFreight_request.New()
|
||||
request.Param = param
|
||||
response, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf("门店绑定运费模板=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf("门店绑定运费模板:=%s", utils.Format4Output(response, false))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -305,8 +292,6 @@ func (a *API) GetStoreFreight(storeId int64) ([]int64, error) {
|
||||
request := shop_getStoreFreight_request.New()
|
||||
request.Param.StoreId = storeId
|
||||
result, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf("获取门店所有的运费模板=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf("获取门店所有的运费模板:=%s", utils.Format4Output(result, false))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -315,7 +300,6 @@ func (a *API) GetStoreFreight(storeId int64) ([]int64, error) {
|
||||
}
|
||||
tempList := make([]int64, 0)
|
||||
if result.Data == nil {
|
||||
globals.SugarLogger.Debugf("绑定运费模板为空")
|
||||
tempList = append(tempList, 0)
|
||||
return tempList, err
|
||||
}
|
||||
@@ -329,8 +313,6 @@ func (a *API) GetStoreFreight(storeId int64) ([]int64, error) {
|
||||
func (a *API) GetStoreFreightDetail(freightId int64) (*freightTemplate_detail_response.Data, error) {
|
||||
request := freightTemplate_detail_request.New()
|
||||
result, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf("获取门店运费模板详情=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf("获取门店运费模板详情:=%s", utils.Format4Output(result, false))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -345,8 +327,6 @@ func (a *API) GetStoreBindTemp(storeId int64) (freightId int64, err error) {
|
||||
request := shop_getStoreFreight_request.New()
|
||||
request.Param.StoreId = storeId
|
||||
result, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf("获取门店绑定的运费模板=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf("获取门店绑定的运费模板:=%s", utils.Format4Output(result, false))
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
@@ -366,8 +346,6 @@ func (a *API) BatchCreateWarehouse(param *warehouse_createBatch_request.Warehous
|
||||
request := warehouse_createBatch_request.New()
|
||||
request.Param = param
|
||||
response, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf("批量创建区域仓=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf("批量创建区域仓:=%s", utils.Format4Output(response, false))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -382,8 +360,6 @@ func (a *API) CreateWarehouse(param *warehouse_create_request.WarehouseCreatePar
|
||||
request := warehouse_create_request.New()
|
||||
request.Param = param
|
||||
response, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf("创建单个区域仓=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf("创建单个区域仓:=%s", utils.Format4Output(response, false))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -398,8 +374,6 @@ func (a *API) StoreBindWarehouse(param *warehouse_bindStore_request.WarehouseBin
|
||||
request := warehouse_bindStore_request.New()
|
||||
request.Param = param
|
||||
response, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf("仓库绑定门店=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf("仓库绑定门店:=%s", utils.Format4Output(response, false))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -431,8 +405,6 @@ func (a *API) CreateFence(param *warehouse_createFence_request.WarehouseCreateFe
|
||||
request := warehouse_createFence_request.New()
|
||||
request.Param = param
|
||||
response, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf("创建电子围栏=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf("创建电子围栏:=%s", utils.Format4Output(response, false))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -447,8 +419,6 @@ func (a *API) SetFence(param *warehouse_setFence_request.WarehouseSetFenceParam)
|
||||
request := warehouse_setFence_request.New()
|
||||
request.Param = param
|
||||
response, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf("更新电子围栏=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf("更新电子围栏:=%s", utils.Format4Output(response, false))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -477,8 +447,6 @@ func (a *API) WarehouseBindFence(param *warehouse_bindFences_request.WarehouseBi
|
||||
request := warehouse_bindFences_request.New()
|
||||
request.Param = param
|
||||
response, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf("仓库绑定电子围栏=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf("仓库绑定电子围栏:=%s", utils.Format4Output(response, false))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -493,8 +461,6 @@ func (a *API) GetFence(outFenceID []string) (*warehouse_getFences_response.Wareh
|
||||
request := warehouse_getFences_request.New()
|
||||
request.Param.OutFenceIdList = outFenceID
|
||||
response, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf(" 获取仓库(即门店)绑定 电子围栏信息列表=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf(" 获取仓库(即门店)绑定 电子围栏信息列表:=%s", utils.Format4Output(response, false))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -510,8 +476,6 @@ func (a *API) AddressCreate(param *address_create_request.AddressCreateParam) (*
|
||||
request := address_create_request.New()
|
||||
request.Param = param
|
||||
response, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf(" 门店新增查询发货地址=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf(" 门店新增查询发货地址:=%s", utils.Format4Output(response, false))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -526,8 +490,6 @@ func (a *API) GetAddressList(param *address_list_request.AddressListParam) (*add
|
||||
request := address_list_request.New()
|
||||
request.Param = param
|
||||
response, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf(" 分页获取商家地址列表=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf(" 分页获取商家地址列表:=%s", utils.Format4Output(response, false))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -542,8 +504,6 @@ func (a *API) GetAreasByProvince(param *address_getAreasByProvince_request.Addre
|
||||
request := address_getAreasByProvince_request.New()
|
||||
request.Param = param
|
||||
response, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf(" 根据省份ID获取全量四级地址=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf(" 根据省份ID获取全量四级地址:=%s", utils.Format4Output(response, false))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -558,8 +518,6 @@ func (a *API) GetProvince(param *address_getProvince_request.AddressGetProvinceP
|
||||
request := address_getProvince_request.New()
|
||||
request.Param = param
|
||||
response, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf(" 获取四级地址全量省份信息=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf(" 获取四级地址全量省份信息:=%s", utils.Format4Output(response, false))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -574,8 +532,6 @@ func (a *API) QueryAllWarehouse(param *warehouse_list_request.WarehouseListParam
|
||||
request := warehouse_list_request.New()
|
||||
request.Param = param
|
||||
result, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf(" 查询所有的仓库=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf(" 查询所有的仓库:=%s", utils.Format4Output(result, false))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -595,8 +551,6 @@ func (a *API) WarehouseUnbindStore(storeId []int64, outWarehouseId string) error
|
||||
request.Param.OutWarehouseId = outWarehouseId
|
||||
|
||||
data, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf(" 仓库解绑门店接口=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf(" 仓库解绑门店接口:=%s", utils.Format4Output(data, false))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -613,8 +567,6 @@ func (a *API) SetStorePackageFee(storeID, packageFee int64) error {
|
||||
request.Param.StoreId = storeID
|
||||
request.Param.PackageFee = packageFee
|
||||
result, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf(" 设置门店打包费接口=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf(" 设置门店打包费接口:=%s", utils.Format4Output(result, false))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -14,8 +14,6 @@ import (
|
||||
superm_getStoreAutoCallRiderInfo_response "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_getStoreAutoCallRiderInfo/response"
|
||||
superm_orderDispatcher_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_orderDispatcher/request"
|
||||
superm_setStoreAutoCallRider_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/superm_setStoreAutoCallRider/request"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -60,8 +58,6 @@ func (a *API) SetStoreAutoCallRider(params *superm_setStoreAutoCallRider_request
|
||||
request := superm_setStoreAutoCallRider_request.New()
|
||||
request.Param = params
|
||||
response, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf("订单自动呼叫运力 设置操作=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf("订单自动呼叫运力 设置操作:=%s", utils.Format4Output(response, false))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -78,8 +74,6 @@ func (a *API) GetStoreAutoCallRiderInfo(storeID int64) (*superm_getStoreAutoCall
|
||||
StoreID: storeID,
|
||||
}
|
||||
response, err := request.Execute(a.accessTokenObj)
|
||||
globals.SugarLogger.Debugf("查询自动呼叫运力配置=========:%s", request.GetUrlPath())
|
||||
globals.SugarLogger.Debugf("查询自动呼叫运力配置:=%s", utils.Format4Output(response, false))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
@@ -48,7 +47,6 @@ func (a *API) WaybillCallback(request *http.Request) (*WaybillCallbackParam, *Ca
|
||||
if err := decoder.Decode(&retVal); err != nil {
|
||||
return nil, Err2CallbackResponse(errors.New("uu跑腿回调参数解析错误,请检查"))
|
||||
}
|
||||
globals.SugarLogger.Debugf("uupt WaybillCallback retVal======%s", utils.Format4Output(retVal, false))
|
||||
con := retVal != WaybillCallbackParam{}
|
||||
if con {
|
||||
return &retVal, Err2CallbackResponse(nil)
|
||||
@@ -62,7 +60,6 @@ func (a *API) CheckCallbackValidation(request *http.Request) (callbackResponse *
|
||||
if err == nil {
|
||||
sign := a.signParam(utils.URLValues2Map(request.PostForm))
|
||||
if sign != request.FormValue(signKey) {
|
||||
globals.SugarLogger.Infof("Signature is not ok, mine:%v, get:%v", sign, request.FormValue(signKey))
|
||||
return SignatureIsNotOk
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/platformapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"math/rand"
|
||||
"net/http"
|
||||
"sort"
|
||||
@@ -77,7 +76,6 @@ func (a *API) AccessAPI(baseUrl, actionApi, method string, bizParams map[string]
|
||||
//}
|
||||
//完整请求url
|
||||
fullPath := utils.GenerateGetURL(baseUrl, actionApi, nil)
|
||||
globals.SugarLogger.Debugf("uupt fullPath======%s", fullPath)
|
||||
//发送请求
|
||||
sendUrl := func() *http.Request {
|
||||
var request *http.Request
|
||||
|
||||
Reference in New Issue
Block a user