1
This commit is contained in:
@@ -20,13 +20,13 @@ func init() {
|
||||
baseapi.Init(sugarLogger)
|
||||
|
||||
// 菜市
|
||||
//api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
|
||||
api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
|
||||
|
||||
// 果园
|
||||
// api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
|
||||
|
||||
//商超
|
||||
api = New("5873", "41c479790a76f86326f89e8048964739", "", "") //token_nH_IlcWQKAkZBqklwItNRw
|
||||
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "") //token_nH_IlcWQKAkZBqklwItNRw
|
||||
cookieStr := `
|
||||
acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1;
|
||||
`
|
||||
|
||||
@@ -3,6 +3,7 @@ package mtwmapi
|
||||
import (
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -18,10 +19,11 @@ func TestOrderViewStatus(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestOrderGetOrderDetail(t *testing.T) {
|
||||
result, err := api.OrderGetOrderDetail(1300486314174032613, false)
|
||||
result, err := api.OrderGetOrderDetail(1100496043552579025, false)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
globals.SugarLogger.Debugf("====%s", utils.Format4Output(result["poi_receive_detail_yuan"], false))
|
||||
if len(result) == 0 {
|
||||
t.Fatal("result should have value")
|
||||
}
|
||||
|
||||
@@ -592,11 +592,11 @@ func (a *API) GetCallbackOrderId(msgId string, data interface{}) (string, int64,
|
||||
}
|
||||
return utils.Int64ToStr(create.PId), int64(create.ShopId), Err2CallbackResponse(nil, "")
|
||||
case CallbackReturnRefundAgreedMsgTagId: // 同意退款消息
|
||||
create := AppointmentChangeData{}
|
||||
create := BusinessRefundSuccessData{}
|
||||
if err := utils.Map2StructByJson(data, &create, false); err != nil {
|
||||
return "", 0, CallbackResponseErr(false)
|
||||
}
|
||||
return create.PId, create.ShopId, Err2CallbackResponse(nil, "")
|
||||
return utils.Int64ToStr(create.PId), create.ShopId, Err2CallbackResponse(nil, "")
|
||||
case CallbackRefundClosedMsgTagId: // 当买家取消申请或系统超时机制导致退款取消时,会推送此消息
|
||||
create := UserCancelRefundOrderData{}
|
||||
if err := utils.Map2StructByJson(data, &create, false); err != nil {
|
||||
|
||||
@@ -411,16 +411,16 @@ type BusinessRefundSuccessCallback struct {
|
||||
|
||||
type BusinessRefundSuccessData struct {
|
||||
AftersaleId int64 `json:"aftersale_id"`
|
||||
AftersaleStatus int `json:"aftersale_status"`
|
||||
AftersaleType int `json:"aftersale_type"`
|
||||
AftersaleStatus int64 `json:"aftersale_status"`
|
||||
AftersaleType int64 `json:"aftersale_type"`
|
||||
PId int64 `json:"p_id"`
|
||||
ReasonCode int `json:"reason_code"`
|
||||
RefundAmount int `json:"refund_amount"`
|
||||
RefundPostAmount int `json:"refund_post_amount"`
|
||||
RefundVoucherNum int `json:"refund_voucher_num"`
|
||||
ReasonCode int64 `json:"reason_code"`
|
||||
RefundAmount int64 `json:"refund_amount"`
|
||||
RefundPostAmount int64 `json:"refund_post_amount"`
|
||||
RefundVoucherNum int64 `json:"refund_voucher_num"`
|
||||
SId int64 `json:"s_id"`
|
||||
ShopId int `json:"shop_id"`
|
||||
SuccessTime int `json:"success_time"`
|
||||
ShopId int64 `json:"shop_id"`
|
||||
SuccessTime int64 `json:"success_time"`
|
||||
UpdateTime time.Time `json:"update_time"`
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user