This commit is contained in:
邹宗楠
2025-02-20 17:09:06 +08:00
parent b78aae3c0a
commit 10b84b91d9
3 changed files with 6 additions and 21 deletions

View File

@@ -39,24 +39,6 @@ func TestOrderGet(t *testing.T) {
}
}
func TestNamegetTimeFromInterface1(t *testing.T) {
fmt.Println((1 & 4) != 0) // 删除
fmt.Println((1 & 2) != 0) // 创建
fmt.Println((1 & 1) != 0) // 更新
}
func getTimeFromInterface1(timeValue interface{}) time.Time {
var timeStamp int64
if timeStr, ok := timeValue.(string); ok {
timeStamp = utils.Str2Int64WithDefault(timeStr, 0)
} else {
timeStamp = utils.Interface2Int64WithDefault(timeValue, 0)
}
if timeStamp < 1538103149 { // 立即达订单给的是1而不是空01538103149不是特殊值只是一个任意之前的时间这样写可以处理
return utils.DefaultTimeValue
}
return utils.Timestamp2Time(timeStamp)
}
func TestOrderAgreePartRefund(t *testing.T) {
param := &RefundOrderExamine{
ReverseOrderId: "",

View File

@@ -8,13 +8,13 @@ import (
)
// 京西速食(蔬菜)
//var token1 = `{"access_token":"97a511yhugi-1j7t4nq1hehos0000sn6spy","expires_in":1732606054,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市","refresh_token":"zuxb12yhugi-1j7t4nq1hehos0000sn6spy","authority_id":""}`
var token1 = `{"access_token":"id7ygfjlbv1j7t4nq1hehos0000yhugi-11","expires_in":1740432711,"scope":"SCOPE","shop_id":57939570,"shop_name":"京西菜市","refresh_token":"277cnzg6t11j7t4nq1hehos0000yhugi-12","authority_id":""}`
// 美好菜市
//var token1 = `{"access_token":"9a315a03-c737-4a82-ae52-c9a6ce827007","expires_in":1699490747,"scope":"SCOPE","shop_id":68032645,"shop_name":"美好菜市","refresh_token":"8334c006-5301-4d25-911b-4d8cc7b70ebb","authority_id":""}`
// 京西到家
var token1 = `{"access_token":"j9cjqyruu01j7t4nq1hehos00014hzcz-11","expires_in":1739587252,"scope":"SCOPE","shop_id":68023619,"shop_name":"京西到家","refresh_token":"pi0v58amo61j7t4nq1hehos00014hzcz-12","authority_id":""}`
//var token1 = `{"access_token":"j9cjqyruu01j7t4nq1hehos00014hzcz-11","expires_in":1739587252,"scope":"SCOPE","shop_id":68023619,"shop_name":"京西到家","refresh_token":"pi0v58amo61j7t4nq1hehos00014hzcz-12","authority_id":""}`
var a = New("7267745202649957900", "51998fcf-d521-4553-8c0c-fa662c8dbd6e", token1)

View File

@@ -95,8 +95,11 @@ func TestGetStoreList2(t *testing.T) {
//获取门店详细信息
func TestGetStoreDetail(t *testing.T) {
data, err := a.GetStoreDetail(&shop_getStoreDetail_request.ShopGetStoreDetailParam{
StoreId: "199514645",
StoreId: "209723410",
})
if len(data.StoreDetail.Store.OpenTime.DayMap) != 0 {
globals.SugarLogger.Debugf("-------data := %s", utils.Format4Output(data.StoreDetail.Store.OpenTime.DayMap, false))
}
fmt.Println(utils.Format4Output(data, false))
fmt.Println(err)
}