aa
This commit is contained in:
@@ -2003,6 +2003,8 @@ func RrefreshMtwmVendorAct(ctx *jxcontext.Context) (err error) {
|
|||||||
if actList, _ := mtapi.RetailDiscountList(storeMap.VendorStoreID, k); len(actList) > 0 {
|
if actList, _ := mtapi.RetailDiscountList(storeMap.VendorStoreID, k); len(actList) > 0 {
|
||||||
for _, act := range actList {
|
for _, act := range actList {
|
||||||
if act.Status > 0 {
|
if act.Status > 0 {
|
||||||
|
if actSkus, _ := dao.GetEffectiveActStoreSkuInfo(db, 0, []int{model.VendorIDMTWM}, model.ActTypeAll, []int{storeMap.StoreID},
|
||||||
|
[]int{utils.Str2Int(act.AppFoodCode)}, utils.Timestamp2Time(act.StartTime), utils.Timestamp2Time(act.EndTime)); len(actSkus) == 0 {
|
||||||
actVendor := &model.ActMtwmVendor{
|
actVendor := &model.ActMtwmVendor{
|
||||||
StoreID: storeMap.StoreID,
|
StoreID: storeMap.StoreID,
|
||||||
SkuID: utils.Str2Int(act.AppFoodCode),
|
SkuID: utils.Str2Int(act.AppFoodCode),
|
||||||
@@ -2026,6 +2028,7 @@ func RrefreshMtwmVendorAct(ctx *jxcontext.Context) (err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return retVal, err
|
return retVal, err
|
||||||
}, storeMaps)
|
}, storeMaps)
|
||||||
tasksch.HandleTask(task, nil, true).Run()
|
tasksch.HandleTask(task, nil, true).Run()
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.rosy.net.cn/jx-callback/business/jxstore/act"
|
||||||
"net"
|
"net"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
@@ -1972,27 +1973,27 @@ func UploadJdsImage(ctx *jxcontext.Context) (err error) {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
//act.RrefreshMtwmVendorAct(jxcontext.AdminCtx)
|
act.RrefreshMtwmVendorAct(jxcontext.AdminCtx)
|
||||||
var (
|
//var (
|
||||||
db = dao.GetDB()
|
// db = dao.GetDB()
|
||||||
skuNames []*model.SkuName
|
// skuNames []*model.SkuName
|
||||||
id1 []int
|
// id1 []int
|
||||||
id2 []int
|
// id2 []int
|
||||||
)
|
//)
|
||||||
sql := `
|
//sql := `
|
||||||
SELECT * FROM sku_name where img like '%origin%' ORDER BY img
|
// SELECT * FROM sku_name where img like '%origin%' and upc <> '' ORDER BY img
|
||||||
`
|
//`
|
||||||
dao.GetRows(db, &skuNames, sql)
|
//dao.GetRows(db, &skuNames, sql)
|
||||||
for _, skuName := range skuNames {
|
//for _, skuName := range skuNames {
|
||||||
data, _, err := jxutils.DownloadFileByURL("http://image.jxc4.com/1616546694origin549a181bN32f4da48.jpg")
|
// data, _, err := jxutils.DownloadFileByURL("http://image.jxc4.com/1616546694origin549a181bN32f4da48.jpg")
|
||||||
if data == nil || err != nil {
|
// if data == nil || err != nil {
|
||||||
id1 = append(id1, skuName.ID)
|
// id1 = append(id1, skuName.ID)
|
||||||
} else {
|
// } else {
|
||||||
id2 = append(id2, skuName.ID)
|
// id2 = append(id2, skuName.ID)
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
fmt.Println("exeNOimg id1", id1)
|
//fmt.Println("exeNOimg id1", id1)
|
||||||
fmt.Println("exeNOimg id2", id2)
|
//fmt.Println("exeNOimg id2", id2)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user