美团力荐修改测试
This commit is contained in:
@@ -3337,7 +3337,29 @@ func UpdateStoreSkusSpecTagBin(ctx *jxcontext.Context, reader io.Reader, vendorI
|
|||||||
if rowNum < 1 {
|
if rowNum < 1 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
getCellForSpecTag(rowNum, row, results)
|
var (
|
||||||
|
skuMap = &tUpdateSkuSpecTag{}
|
||||||
|
storeID int
|
||||||
|
skuID int
|
||||||
|
isSpec int
|
||||||
|
)
|
||||||
|
for k, cell := range row {
|
||||||
|
if cell != "" {
|
||||||
|
if k == 0 {
|
||||||
|
storeID = int(utils.Str2Int64(cell))
|
||||||
|
}
|
||||||
|
if k == 1 {
|
||||||
|
skuID = int(utils.Str2Int64(cell))
|
||||||
|
}
|
||||||
|
if k == 2 {
|
||||||
|
isSpec = int(utils.Str2Int64(cell))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
skuMap.SkuID = skuID
|
||||||
|
skuMap.IsSpec = isSpec
|
||||||
|
skuMap.StoreID = storeID
|
||||||
|
results = append(results, skuMap)
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
for i := 0; i < len(results)/2; i++ {
|
for i := 0; i < len(results)/2; i++ {
|
||||||
@@ -3347,7 +3369,9 @@ func UpdateStoreSkusSpecTagBin(ctx *jxcontext.Context, reader io.Reader, vendorI
|
|||||||
}
|
}
|
||||||
for _, v := range results {
|
for _, v := range results {
|
||||||
store, err := dao.GetStoreDetail(db, v.StoreID, model.VendorIDMTWM)
|
store, err := dao.GetStoreDetail(db, v.StoreID, model.VendorIDMTWM)
|
||||||
|
globals.SugarLogger.Debugf("store: [%v]", *store)
|
||||||
storeSkus, err := dao.GetStoresSkusInfo(db, []int{v.StoreID}, []int{v.SkuID})
|
storeSkus, err := dao.GetStoresSkusInfo(db, []int{v.StoreID}, []int{v.SkuID})
|
||||||
|
globals.SugarLogger.Debugf("storeSkus: [%v]", *storeSkus[0])
|
||||||
if err != nil || store == nil {
|
if err != nil || store == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -3375,33 +3399,6 @@ func UpdateStoreSkusSpecTagBin(ctx *jxcontext.Context, reader io.Reader, vendorI
|
|||||||
return hint, err
|
return hint, err
|
||||||
}
|
}
|
||||||
|
|
||||||
func getCellForSpecTag(rowNum int, row []string, storeSkuMap []*tUpdateSkuSpecTag) {
|
|
||||||
var (
|
|
||||||
skuMap = &tUpdateSkuSpecTag{}
|
|
||||||
storeID int
|
|
||||||
skuID int
|
|
||||||
isSpec int
|
|
||||||
)
|
|
||||||
for k, cell := range row {
|
|
||||||
if cell != "" {
|
|
||||||
fmt.Println(cell)
|
|
||||||
if k == 0 {
|
|
||||||
storeID = int(utils.Str2Int64(cell))
|
|
||||||
}
|
|
||||||
if k == 1 {
|
|
||||||
skuID = int(utils.Str2Int64(cell))
|
|
||||||
}
|
|
||||||
if k == 2 {
|
|
||||||
isSpec = int(utils.Str2Int64(cell))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
skuMap.SkuID = skuID
|
|
||||||
skuMap.IsSpec = isSpec
|
|
||||||
skuMap.StoreID = storeID
|
|
||||||
storeSkuMap = append(storeSkuMap, skuMap)
|
|
||||||
}
|
|
||||||
|
|
||||||
func SendSeckillSkusCountMsg(ctx *jxcontext.Context, vendorIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
|
func SendSeckillSkusCountMsg(ctx *jxcontext.Context, vendorIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||||
// 1. 如果爆品低于8个,报警 type1
|
// 1. 如果爆品低于8个,报警 type1
|
||||||
// 2. 爆品价格低于1元商品小于5个,报警 type2
|
// 2. 爆品价格低于1元商品小于5个,报警 type2
|
||||||
|
|||||||
Reference in New Issue
Block a user