This commit is contained in:
邹宗楠
2023-03-27 09:31:27 +08:00
parent 82d2f9a674
commit 84c4376f08
5 changed files with 9 additions and 13 deletions

View File

@@ -4,7 +4,6 @@ package jdapi
import (
"encoding/json"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/globals"
)
const (
@@ -338,7 +337,6 @@ func (a *API) GetStoreInfoByStationNo2(storeNo string) (storeDetail *StoreDetail
// }
func (a *API) UpdateStoreInfo4Open2(updateParams *OpStoreParams, modifyCloseStatus bool) (err error) {
globals.SugarLogger.Debugf("====UpdateStoreInfo4Open2 : %s", utils.Format4Output(updateParams, false))
updateParams.Operator = utils.GetAPIOperator(updateParams.Operator)
mapData := utils.Struct2MapByJson(updateParams)
if !modifyCloseStatus {

View File

@@ -172,6 +172,7 @@ func (a *API) GetPrinterStatus(printNo string) (status int64, err error) {
}
func (a *API) DoPrint(printNo, content string, orderNo int) (msgID string, err error) {
content = utils.FilterMb4(content)
result, err := a.AccessAPI("DoPrint", map[string]interface{}{
"print_no": printNo,
"content": content,

View File

@@ -441,7 +441,7 @@ func (a *API) RetailDiscountDelete2(poiCode string, actType int, actIDList []str
return failedList, err
}
func (a *API) RetailDiscountDelete(poiCode string, actType int, actIDList []string) (err error) {
func (a *API) RetailiscountDelete(poiCode string, actType int, actIDList []string) (err error) {
_, err = a.RetailDiscountDelete2(poiCode, actType, actIDList)
return err
}

View File

@@ -1,6 +1,7 @@
package mtwmapi
import (
"git.rosy.net.cn/jx-callback/globals"
"testing"
"time"
@@ -154,18 +155,14 @@ func TestRetailDiscountBatchSave(t *testing.T) {
}
func TestRetailDiscountList(t *testing.T) {
result, err := api.RetailDiscountList("8040309", RetailActTypeDirectDown)
result, err := api.RetailDiscountList("8694203", RetailActTypeSecKill)
if err != nil {
t.Fatal(err)
}
t.Log(utils.Format4Output(result, false))
}
func TestRetailDiscountDelete(t *testing.T) {
err := api.RetailDiscountDelete(testPoiCode, RetailActTypeDirectDown, []string{"329187452"})
if err != nil {
t.Fatal(err)
for _, v := range result {
globals.SugarLogger.Debugf("%s", utils.Format4Output(v, false))
}
//t.Log(utils.Format4Output(result, false))
}
func TestInStoreCouponList(t *testing.T) {

View File

@@ -20,10 +20,10 @@ func init() {
baseapi.Init(sugarLogger)
// 菜市
//api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
// 果园
api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
//api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
//商超
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "") //token_nH_IlcWQKAkZBqklwItNRw