1
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user