1
This commit is contained in:
@@ -4,7 +4,6 @@ package jdapi
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -338,7 +337,6 @@ func (a *API) GetStoreInfoByStationNo2(storeNo string) (storeDetail *StoreDetail
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
func (a *API) UpdateStoreInfo4Open2(updateParams *OpStoreParams, modifyCloseStatus bool) (err error) {
|
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)
|
updateParams.Operator = utils.GetAPIOperator(updateParams.Operator)
|
||||||
mapData := utils.Struct2MapByJson(updateParams)
|
mapData := utils.Struct2MapByJson(updateParams)
|
||||||
if !modifyCloseStatus {
|
if !modifyCloseStatus {
|
||||||
|
|||||||
@@ -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) {
|
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{}{
|
result, err := a.AccessAPI("DoPrint", map[string]interface{}{
|
||||||
"print_no": printNo,
|
"print_no": printNo,
|
||||||
"content": content,
|
"content": content,
|
||||||
|
|||||||
@@ -441,7 +441,7 @@ func (a *API) RetailDiscountDelete2(poiCode string, actType int, actIDList []str
|
|||||||
return failedList, err
|
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)
|
_, err = a.RetailDiscountDelete2(poiCode, actType, actIDList)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package mtwmapi
|
package mtwmapi
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -154,18 +155,14 @@ func TestRetailDiscountBatchSave(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestRetailDiscountList(t *testing.T) {
|
func TestRetailDiscountList(t *testing.T) {
|
||||||
result, err := api.RetailDiscountList("8040309", RetailActTypeDirectDown)
|
result, err := api.RetailDiscountList("8694203", RetailActTypeSecKill)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
t.Log(utils.Format4Output(result, false))
|
for _, v := range result {
|
||||||
}
|
globals.SugarLogger.Debugf("%s", utils.Format4Output(v, false))
|
||||||
|
|
||||||
func TestRetailDiscountDelete(t *testing.T) {
|
|
||||||
err := api.RetailDiscountDelete(testPoiCode, RetailActTypeDirectDown, []string{"329187452"})
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
}
|
||||||
|
//t.Log(utils.Format4Output(result, false))
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestInStoreCouponList(t *testing.T) {
|
func TestInStoreCouponList(t *testing.T) {
|
||||||
|
|||||||
@@ -20,10 +20,10 @@ func init() {
|
|||||||
baseapi.Init(sugarLogger)
|
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
|
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "") //token_nH_IlcWQKAkZBqklwItNRw
|
||||||
|
|||||||
Reference in New Issue
Block a user