This commit is contained in:
richboo111
2022-10-26 10:19:15 +08:00
4 changed files with 25 additions and 7 deletions

View File

@@ -4,7 +4,9 @@ import (
"bytes"
"crypto/md5"
"encoding/json"
"errors"
"fmt"
"git.rosy.net.cn/jx-callback/globals"
"net/http"
"reflect"
"sort"
@@ -280,6 +282,13 @@ func (a *API) AccessAPINoPage2(apiStr string, jdParams map[string]interface{}, k
if err != nil {
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{}
if err := utils.UnmarshalUseNumber([]byte(jsonResult["data"].(string)), &data); err != nil {
return nil, platformapi.ErrResponseDataFormatWrong

View File

@@ -2,6 +2,8 @@ package tiktok_api
import (
"fmt"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/globals"
"testing"
)
@@ -20,7 +22,9 @@ func TestAggreOrNotAggreAfs(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)
}
//

View File

@@ -157,16 +157,16 @@ const (
// 501 7 6,27 同意补寄
// 502 7 6 拒绝补寄
const (
AfterSaleEmuAgreeToReturnOneApply = 101 // 同意退货申请(一次审核) Logistics.ReceiverAddressId 或 Logistics.AfterSaleAddressDetail
AfterSaleEmuAgreeToReturnOneApply = 101 // 同意退货申请(一次审核)不接 Logistics.ReceiverAddressId 或 Logistics.AfterSaleAddressDetail
AfterSaleEmuRefuseToReturnOneApply = 102 // 拒绝退货申请(一次审核) reason , evidence
AfterSaleEmuAgreeToReturnTwoApply = 111 // 同意退货(二次审核)
AfterSaleEmuAgreeToReturnTwoApply = 111 // 同意退货(二次审核) 不接
AfterSaleEmuRefuseToReturnTwoApply = 112 // 拒绝退货 (二次审核) reason , evidence
AfterSaleEmuReturnGoodsToRefundApply = 121 // 退货转退款
AfterSaleEmuAgreeOnlyRefundApply = 201 // 同意仅退款
AfterSaleEmuRefuseOnlyRefundApply = 202 // 拒绝仅退款 reason , evidence
AfterSaleEmuRefundAfterRefusalApply = 203 // 同意拒签后退款
AfterSaleEmuAgreeChangeGoodsOneApply = 301 // 同意换货申请(一次审核) Logistics.ReceiverAddressId 或 Logistics.AfterSaleAddressDetail
AfterSaleEmuRefundChangeGoodsOneApply = 302 // 拒绝换货申请(一次审核) reason,evidence
AfterSaleEmuRefundAfterRefusalApply = 203 // 同意拒签后退款 不接
AfterSaleEmuAgreeChangeGoodsOneApply = 301 // 同意换货申请(一次审核) 不接 Logistics.ReceiverAddressId 或 Logistics.AfterSaleAddressDetail
AfterSaleEmuRefundChangeGoodsOneApply = 302 // 拒绝换货申请(一次审核) reason,evidence
AfterSaleEmuAgreeChangeGoodsTwoApply = 311 // 同意换货(二次审核) logistics.companyCode,logistics.logisticsCode
AfterSaleEmuRefundChangeGoodsTwoApply = 312 // 拒绝换货(二次审核) reason,evidence
AfterSaleEmuChangeGoodsToRefundApply = 321 // 换货转退款

View File

@@ -36,8 +36,9 @@ func TestCategory(t *testing.T) {
}
func TestGetCatePropertyV2(t *testing.T) {
data, err := a.GetCatePropertyV2(29146)
data, err := a.GetCatePropertyV2(35237)
fmt.Println("err=====", err)
globals.SugarLogger.Debugf("data:=%s", utils.Format4Output(data, false))
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) {
fmt.Println((1 & 1) != 0)
fmt.Println(1&2 == 0)