查询商品库修改
This commit is contained in:
@@ -666,8 +666,6 @@ func GetSkuNames(ctx *jxcontext.Context, keyword string, isBySku, isQueryMidPric
|
||||
}()
|
||||
// globals.SugarLogger.Debug(sqlData)
|
||||
// globals.SugarLogger.Debug(utils.Format4Output(sqlParams, false))
|
||||
fmt.Println(sqlData)
|
||||
fmt.Println(sqlParams)
|
||||
if err = dao.GetRows(db, &skuNamesInfo.SkuNames, sqlData, sqlParams...); err == nil {
|
||||
skuNamesInfo.TotalCount = dao.GetLastTotalRowCount(db)
|
||||
dao.Commit(db)
|
||||
@@ -1875,7 +1873,7 @@ func CreateUpcSkuByExcelBin(ctx *jxcontext.Context, reader io.Reader, categoryID
|
||||
retVal = []*CreateUpcSkuByExcelErr{buildCreateUpcSkuByExcelErr(v, "商品的条码不能为空!")}
|
||||
return retVal, err
|
||||
}
|
||||
skuNames, _ := dao.GetSkuNames(db, nil, []string{*v.Upc}, "")
|
||||
skuNames, _ := dao.GetSkuNames(db, nil, []string{*v.Upc}, "", false)
|
||||
if len(skuNames) > 0 {
|
||||
retVal = []*CreateUpcSkuByExcelErr{buildCreateUpcSkuByExcelErr(v, "商品在京西库中已存在!")}
|
||||
return retVal, err
|
||||
@@ -1971,7 +1969,7 @@ func CreateUpcSkuByExcelBin(ctx *jxcontext.Context, reader io.Reader, categoryID
|
||||
return retVal, err
|
||||
}
|
||||
}
|
||||
skuNames2, _ := dao.GetSkuNames(db, nil, nil, productInfo.Name)
|
||||
skuNames2, _ := dao.GetSkuNames(db, nil, nil, productInfo.Name, false)
|
||||
if len(skuNames2) > 1 {
|
||||
retVal = []*CreateUpcSkuByExcelErr{buildCreateUpcSkuByExcelErr(v, "此商品名在京西库中查询出了大于1个商品!")}
|
||||
return retVal, err
|
||||
|
||||
Reference in New Issue
Block a user