This commit is contained in:
邹宗楠
2025-03-24 15:40:21 +08:00
parent 2663099187
commit cf38acc037
12 changed files with 64 additions and 44 deletions

View File

@@ -2,6 +2,7 @@ package mtwmapi
import (
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/globals"
)
const (
@@ -59,6 +60,9 @@ func (a *API) GetStoreBillList(param *Bill) (map[string]*SettleOrderList, int64,
if !ok {
settle = &SettleOrderList{OrderId: v.WmOrderViewId}
}
if v.WmOrderViewId == "2001521861299113073" {
globals.SugarLogger.Debugf("------%s:%s", v.WmOrderViewId, utils.Format4Output(v, false))
}
switch v.BillChargeType {
case BillChargeTypeOrder: // 平台结算
settle.PlatformSettlement = v.SettleAmount

View File

@@ -11,7 +11,7 @@ func TestBillList(t *testing.T) {
from := time.Date(now.Year(), now.Month(), now.Day()-2, 0, 0, 0, 0, time.Local)
to := time.Date(now.Year(), now.Month(), now.Day()-1, 23, 59, 59, 59, time.Local)
param := &Bill{
AppPoiCode: "18833517",
AppPoiCode: "20046303",
StartDate: from.Unix(),
EndDate: to.Unix(),
Offset: 0,

View File

@@ -23,10 +23,10 @@ func init() {
//api = New("589", "a81eb3df418d83d6a1a4b7c572156d2f", "", "")
// 果园
//api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
api = New("4123", "df2c88338b85f830cebce2a9eab56628", "", "")
//商超
api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_hGnQOvCSkfrCOXFLHA1NMQ")
//api = New("5873", "41c479790a76f86326f89e8048964739", "", "token_hGnQOvCSkfrCOXFLHA1NMQ")
//cookieStr := `
// acctId=57396785; token=0bWbK5VbK50E2BmIhIH2zHB-am_y7mB37yXHm6RLZWx4*; wmPoiId=-1;
//`

View File

@@ -31,7 +31,7 @@ func getTimeFromTimestamp(timeStamp int64) time.Time {
}
func TestOrderGetOrderDetail(t *testing.T) {
result, err := api.OrderGetOrderDetail(4101460891740121194, false)
result, err := api.OrderGetOrderDetail(2001521861299113073, false)
if err != nil {
t.Fatal(err)
}

View File

@@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"git.rosy.net.cn/baseapi/utils"
"strings"
"testing"
)
@@ -23,7 +24,16 @@ func TestPoiGetIDs(t *testing.T) {
}
func Test1111(t *testing.T) {
fmt.Println(utils.Float64TwoInt(float64(1132) / float64(2441) * float64(805)))
result, err := api.PoiMGet([]string{"17821732"})
if err != nil {
fmt.Println(err)
}
for _, v := range result {
if strings.Contains(v.Name, "京西") {
data := fmt.Sprintf("%s %s ", v.AppPoiCode, v.Name) + fmt.Sprintf("<table><img src=%s height=100 width=100></table>", v.PicURL)
fmt.Println(data)
}
}
}
func TestPoiMGet(t *testing.T) {
result, err := api.PoiMGet([]string{"17821732"})