1
This commit is contained in:
@@ -3,12 +3,8 @@ package jxprintapi
|
||||
import (
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"go.uber.org/zap"
|
||||
"net/http"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -115,25 +111,11 @@ func TestDoPrint(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestName23(t *testing.T) {
|
||||
url := "https://www.jxc4.com/v2/store/sku/UpdateStoresSkus"
|
||||
|
||||
var storeList = []int64{100123, 100455, 666900, 102364, 102859, 669086, 102877, 102963, 669119, 667222, 668906, 667558, 102374, 103161, 102433, 667405, 102443, 102883, 103182, 668429, 668530, 100546, 668401, 667229, 668809, 666913, 102475, 666917, 100610, 669029, 102479, 669168, 100135, 667242, 668909, 100144, 100654, 667410, 102966, 103189, 668567, 102481, 668918, 100145, 667560, 102490, 103191, 667247, 102981, 667429, 100157, 668928, 103194, 666932, 102985, 668620, 100712, 667261, 666948, 667271, 668814, 100726, 667446, 103199, 102987, 667562, 669188, 102496, 100175, 102895, 667909, 667453, 100190, 669479, 669201, 666949, 667283, 668043, 102533, 102896, 100741, 668054, 103201, 669227, 100206, 667467, 668622, 100236, 102907, 668931, 103361, 669240, 102923, 102630, 103002, 669283, 667014, 668160, 668815, 100273, 668821, 101013, 667296, 102933, 668506, 103004, 667066, 103417, 101099, 669493, 668756, 667468, 668184, 100274, 103022, 667299, 667485, 103435, 668191, 668786, 102642, 101176, 667067, 100278, 667490, 103032, 667085, 666667, 669007, 667305, 100290, 102934, 101687, 668790, 102676, 103033, 666677, 667514, 666707, 101763, 667119, 668252, 103037, 101916, 102742, 101956, 667128, 668360, 667316, 103050, 666709, 100292, 102778, 669022, 103082, 100296, 100324, 667542, 102016, 102812, 102950, 667332, 102821, 666756, 668829, 102147, 667134, 102167, 668850, 103085, 100325, 667157, 666779, 668384, 102952, 103103, 102826, 668883, 100361, 667365, 669032, 102955, 669044, 102223, 667173, 100369, 666800, 102280, 102844, 667399, 103113, 100002, 666828, 669054, 102851, 102350, 669055, 666840, 100032, 102956, 100115, 667208, 668891, 100449, 668900, 667212, 103151, 668417, 100454, 102962}
|
||||
|
||||
for _, v := range storeList {
|
||||
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storeIDs\"\r\n\r\n[" + utils.Int64ToStr(v) + "]\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"payload\"\r\n\r\n[{\"nameID\":8075899,\"unitPrice\":1600}]\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"causeFlag\"\r\n\r\n16\r\n-----011000010111000001101001--\r\n\r\n")
|
||||
|
||||
req, _ := http.NewRequest("PUT", url, payload)
|
||||
|
||||
req.Header.Add("token", "TOKEN.V2.2452A93EEB9111EC9B06525400E86DC0.20240913-144538.localpass.C9588B01719B11EF95B3525400E86DC0.[18981810340]")
|
||||
req.Header.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")
|
||||
|
||||
_, err := http.DefaultClient.Do(req)
|
||||
if err != nil {
|
||||
fmt.Println(v)
|
||||
} else {
|
||||
fmt.Println("=", v)
|
||||
}
|
||||
time.Sleep(1 * time.Second)
|
||||
count := 236 / 50
|
||||
fmt.Println(count)
|
||||
if 236%50 != 0 {
|
||||
count += 1
|
||||
}
|
||||
|
||||
fmt.Println(count)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user