This commit is contained in:
suyl
2021-10-13 11:07:04 +08:00
parent 4ef332b48d
commit 9b6f6794dc

View File

@@ -1976,6 +1976,8 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
var (
db = dao.GetDB()
skuNames []*model.SkuName
id1 []int
id2 []int
)
sql := `
SELECT * FROM sku_name where img like '%origin%' ORDER BY img
@@ -1984,9 +1986,13 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
for _, skuName := range skuNames {
data, _, err := jxutils.DownloadFileByURL("http://image.jxc4.com/1616546694origin549a181bN32f4da48.jpg")
if data == nil || err != nil {
fmt.Println("exeNoImg2 img", skuName.ID)
id1 = append(id1, skuName.ID)
} else {
id2 = append(id2, skuName.ID)
}
}
fmt.Println("exeNOimg id1", id1)
fmt.Println("exeNOimg id2", id2)
return err
}