From 524c16fc9e5a7672bd95bbc2246eae6658c6c3e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Fri, 23 Feb 2024 17:14:08 +0800 Subject: [PATCH] 1 --- platformapi/mtwmapi/act.go | 6 ------ platformapi/mtwmapi/retail_test.go | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/platformapi/mtwmapi/act.go b/platformapi/mtwmapi/act.go index 6afc50d5..e75d881b 100644 --- a/platformapi/mtwmapi/act.go +++ b/platformapi/mtwmapi/act.go @@ -1,7 +1,6 @@ package mtwmapi import ( - "git.rosy.net.cn/jx-callback/globals" "strings" "git.rosy.net.cn/baseapi/utils" @@ -384,13 +383,11 @@ func (a *API) RetailDiscountBatchSave2(poiCode string, actType int, actData []*R if actType == 0 { actType = RetailActTypeDirectDown } - globals.SugarLogger.Debugf("RetailDiscountBatchSave2 test0129 appID=%s,secret=%s", a.appID, a.secret) result, err := a.AccessAPI2("act/retail/discount/batchsave", false, map[string]interface{}{ KeyAppPoiCode: poiCode, "act_data": string(utils.MustMarshal(actData)), "act_type": actType, }, "", "") - globals.SugarLogger.Debugf("RetailDiscountBatchSave2 test0129 result=%s", utils.Format4Output(result, false)) var msg string if err == nil { @@ -398,12 +395,9 @@ func (a *API) RetailDiscountBatchSave2(poiCode string, actType int, actData []*R err = utils.UnmarshalUseNumber([]byte(resultMap[resultKeySuccessMsg].(string)), &actResult) if err == nil { msg = utils.Interface2String(resultMap[resultKeyMsg]) - globals.SugarLogger.Debugf("RetailDiscountBatchSave2 test0129 msg:%v", utils.Format4Output(msg, false)) - } } else { msg = getMsgFromError(err) - globals.SugarLogger.Debugf("RetailDiscountBatchSave2 test0129 err:%v", err) } failedList = parseErr4ErrList(msg) return actResult, failedList, err diff --git a/platformapi/mtwmapi/retail_test.go b/platformapi/mtwmapi/retail_test.go index 46f5ba1f..c677ab5c 100644 --- a/platformapi/mtwmapi/retail_test.go +++ b/platformapi/mtwmapi/retail_test.go @@ -330,6 +330,12 @@ func TestRetailBatchInitData(t *testing.T) { t.Log(utils.Format4Output(failedFoods, false)) } +func TestSort(t *testing.T) { + data := map[int64]int64{1: 1, 2: 1, 4: 1} + data[1] = 3 + fmt.Println(data) +} + func TestRetailSkuStock(t *testing.T) { result, err := api.RetailSkuStock(utils.GetUUID(), testPoiCode, []*BareStoreFoodInfo{ &BareStoreFoodInfo{