package localjx

import (
	"fmt"
	"testing"
	"time"

	"git.rosy.net.cn/baseapi/utils"
	"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
	"git.rosy.net.cn/jx-callback/globals/testinit"
)

func init() {
	testinit.Init()
}

func TestGenOrderNo(t *testing.T) {
	loc, _ := time.LoadLocation("Local")

	t1, _ := time.ParseInLocation("20060102150405", time.Unix(1654510539, 0).Format("20060102150405"), loc)
	fmt.Println("t1", t1)
}

func TestGetAvailableDeliverTime(t *testing.T) {
	timeInfo, err := GetAvailableDeliverTime(jxcontext.AdminCtx, 100118)
	if err != nil {
		t.Fatal(err)
	}
	t.Log(utils.Format4Output(timeInfo, false))
}
func TestChangeStatus(t *testing.T) {
	err := changeOrderStatus("88398619646640", 115, "")
	fmt.Println(err)
}
