Merge branch 'master' of https://e.coding.net/rosydev/baseapi
This commit is contained in:
@@ -4,7 +4,9 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"net/http"
|
"net/http"
|
||||||
"reflect"
|
"reflect"
|
||||||
"sort"
|
"sort"
|
||||||
@@ -280,6 +282,13 @@ func (a *API) AccessAPINoPage2(apiStr string, jdParams map[string]interface{}, k
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if jsonResult["code"].(string) != "0" {
|
||||||
|
return nil, errors.New(jsonResult["msg"].(string))
|
||||||
|
}
|
||||||
|
if jsonResult["data"] == nil || utils.IsNil(jsonResult["data"]) {
|
||||||
|
return nil, errors.New("data is nil")
|
||||||
|
}
|
||||||
|
globals.SugarLogger.Debugf("====AccessAPINoPage2============%s", utils.Format4Output(jsonResult, false))
|
||||||
var data map[string]interface{}
|
var data map[string]interface{}
|
||||||
if err := utils.UnmarshalUseNumber([]byte(jsonResult["data"].(string)), &data); err != nil {
|
if err := utils.UnmarshalUseNumber([]byte(jsonResult["data"].(string)), &data); err != nil {
|
||||||
return nil, platformapi.ErrResponseDataFormatWrong
|
return nil, platformapi.ErrResponseDataFormatWrong
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ package tiktok_api
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -20,7 +22,9 @@ func TestAggreOrNotAggreAfs(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestGetSkuDetailLocalID(t *testing.T) {
|
func TestGetSkuDetailLocalID(t *testing.T) {
|
||||||
a.GetSkuDetailLocalID("", "609483111")
|
data, err := a.GetSkuDetailLocalID("", "30644")
|
||||||
|
globals.SugarLogger.Debugf("data=%s", utils.Format4Output(data, false))
|
||||||
|
globals.SugarLogger.Debugf("data=%s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -157,16 +157,16 @@ const (
|
|||||||
// 501 7 6,27 同意补寄
|
// 501 7 6,27 同意补寄
|
||||||
// 502 7 6 拒绝补寄
|
// 502 7 6 拒绝补寄
|
||||||
const (
|
const (
|
||||||
AfterSaleEmuAgreeToReturnOneApply = 101 // 同意退货申请(一次审核) Logistics.ReceiverAddressId 或 Logistics.AfterSaleAddressDetail
|
AfterSaleEmuAgreeToReturnOneApply = 101 // 同意退货申请(一次审核)不接 Logistics.ReceiverAddressId 或 Logistics.AfterSaleAddressDetail
|
||||||
AfterSaleEmuRefuseToReturnOneApply = 102 // 拒绝退货申请(一次审核) reason , evidence
|
AfterSaleEmuRefuseToReturnOneApply = 102 // 拒绝退货申请(一次审核) reason , evidence
|
||||||
AfterSaleEmuAgreeToReturnTwoApply = 111 // 同意退货(二次审核)
|
AfterSaleEmuAgreeToReturnTwoApply = 111 // 同意退货(二次审核) 不接
|
||||||
AfterSaleEmuRefuseToReturnTwoApply = 112 // 拒绝退货 (二次审核) reason , evidence
|
AfterSaleEmuRefuseToReturnTwoApply = 112 // 拒绝退货 (二次审核) reason , evidence
|
||||||
AfterSaleEmuReturnGoodsToRefundApply = 121 // 退货转退款
|
AfterSaleEmuReturnGoodsToRefundApply = 121 // 退货转退款
|
||||||
AfterSaleEmuAgreeOnlyRefundApply = 201 // 同意仅退款
|
AfterSaleEmuAgreeOnlyRefundApply = 201 // 同意仅退款
|
||||||
AfterSaleEmuRefuseOnlyRefundApply = 202 // 拒绝仅退款 reason , evidence
|
AfterSaleEmuRefuseOnlyRefundApply = 202 // 拒绝仅退款 reason , evidence
|
||||||
AfterSaleEmuRefundAfterRefusalApply = 203 // 同意拒签后退款
|
AfterSaleEmuRefundAfterRefusalApply = 203 // 同意拒签后退款 不接
|
||||||
AfterSaleEmuAgreeChangeGoodsOneApply = 301 // 同意换货申请(一次审核) Logistics.ReceiverAddressId 或 Logistics.AfterSaleAddressDetail
|
AfterSaleEmuAgreeChangeGoodsOneApply = 301 // 同意换货申请(一次审核) 不接 Logistics.ReceiverAddressId 或 Logistics.AfterSaleAddressDetail
|
||||||
AfterSaleEmuRefundChangeGoodsOneApply = 302 // 拒绝换货申请(一次审核) reason,evidence
|
AfterSaleEmuRefundChangeGoodsOneApply = 302 // 拒绝换货申请(一次审核) reason,evidence
|
||||||
AfterSaleEmuAgreeChangeGoodsTwoApply = 311 // 同意换货(二次审核) logistics.companyCode,logistics.logisticsCode
|
AfterSaleEmuAgreeChangeGoodsTwoApply = 311 // 同意换货(二次审核) logistics.companyCode,logistics.logisticsCode
|
||||||
AfterSaleEmuRefundChangeGoodsTwoApply = 312 // 拒绝换货(二次审核) reason,evidence
|
AfterSaleEmuRefundChangeGoodsTwoApply = 312 // 拒绝换货(二次审核) reason,evidence
|
||||||
AfterSaleEmuChangeGoodsToRefundApply = 321 // 换货转退款
|
AfterSaleEmuChangeGoodsToRefundApply = 321 // 换货转退款
|
||||||
|
|||||||
@@ -36,8 +36,9 @@ func TestCategory(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestGetCatePropertyV2(t *testing.T) {
|
func TestGetCatePropertyV2(t *testing.T) {
|
||||||
data, err := a.GetCatePropertyV2(29146)
|
data, err := a.GetCatePropertyV2(35237)
|
||||||
fmt.Println("err=====", err)
|
fmt.Println("err=====", err)
|
||||||
|
globals.SugarLogger.Debugf("data:=%s", utils.Format4Output(data, false))
|
||||||
fmt.Println("data====", data) // 202209281558450102081001701D7B32C5
|
fmt.Println("data====", data) // 202209281558450102081001701D7B32C5
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -328,6 +329,10 @@ func TestGetSkuList(t *testing.T) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestGetBrandId(t *testing.T) {
|
||||||
|
a.GetSkuBrand(29146)
|
||||||
|
}
|
||||||
|
|
||||||
func Test11111(t *testing.T) {
|
func Test11111(t *testing.T) {
|
||||||
fmt.Println((1 & 1) != 0)
|
fmt.Println((1 & 1) != 0)
|
||||||
fmt.Println(1&2 == 0)
|
fmt.Println(1&2 == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user