txd
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/platformapi/tao_vegetable/sdk/ability2770/domain"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
@@ -21,9 +22,49 @@ func TestActivityCreate(t *testing.T) {
|
||||
Terminals: &[]int32{1},
|
||||
StoreIds: &[]string{"JX668998"},
|
||||
DiscountType: utils.Int64ToPointer(3),
|
||||
StartTime: utils.Int64ToPointer(time.Now().Unix()),
|
||||
EndTime: utils.Int64ToPointer(time.Now().Unix() + time.Hour.Milliseconds()),
|
||||
StartTime: utils.Int64ToPointer(time.Now().UnixNano() / int64(time.Millisecond)),
|
||||
EndTime: utils.Int64ToPointer((time.Now().UnixNano() / int64(time.Millisecond)) + 3*time.Hour.Milliseconds()),
|
||||
})
|
||||
fmt.Println(resp)
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
//查询单品特价活动【同城零售】
|
||||
func TestQueryAct(t *testing.T) {
|
||||
resp, err := apiTao.ActivityQuery(230658198, "")
|
||||
fmt.Println(resp)
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
//更新单品特价活动【同城零售】
|
||||
func TestUpdateAct(t *testing.T) {
|
||||
err := apiTao.ActivityUpdate(domain.AlibabaRetailMarketingItemdiscountActivityUpdateItemDiscountActivityOperateRequest{
|
||||
ActivityName: utils.String2Pointer("更新单品特价活动测试619"),
|
||||
CreatorId: utils.String2Pointer("20230619180157"),
|
||||
CreatorName: utils.String2Pointer("京西菜市"),
|
||||
Description: utils.String2Pointer("特价活动很火热"),
|
||||
Terminals: &[]int32{1},
|
||||
StoreIds: &[]string{"JX668998"},
|
||||
StartTime: utils.Int64ToPointer(time.Now().UnixNano() / int64(time.Millisecond)),
|
||||
EndTime: utils.Int64ToPointer((time.Now().UnixNano() / int64(time.Millisecond)) + 3*time.Hour.Milliseconds()),
|
||||
ActId: utils.Int64ToPointer(230658198),
|
||||
})
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
//删除单品特价活动【同城零售】
|
||||
func TestDeleteAct(t *testing.T) {
|
||||
err := apiTao.ActivityDelete("20230619180157", "京西菜市", 230658198)
|
||||
fmt.Println(err)
|
||||
}
|
||||
|
||||
func TestA(t *testing.T) {
|
||||
str := "J100867"
|
||||
if strings.Contains(str, "X") {
|
||||
data := strings.Split(str, "X")
|
||||
fmt.Println(data[1])
|
||||
} else {
|
||||
fmt.Println("null")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user