This commit is contained in:
苏尹岚
2021-03-31 15:53:06 +08:00
parent 423c1f8845
commit 1208b4357e

View File

@@ -741,12 +741,12 @@ func GetStoresSkusNew(ctx *jxcontext.Context, storeIDs, skuIDs []int, upcs []str
sqlParams2 = append(sqlParams2, sqlParamsPage)
var storeNameList []*tStoreNameBind
beginTime := time.Now()
if err = dao.GetRows(db, &storeNameList, sql2, sqlParams2...); err != nil {
if err = dao.GetRowsTx(txDB, &storeNameList, sql2, sqlParams2...); err != nil {
dao.Rollback(db, txDB)
return nil, err
}
globals.SugarLogger.Debugf("GetStoresSkusNew get result1:%v", time.Now().Sub(beginTime))
skuNamesInfo.TotalCount = dao.GetLastTotalRowCount(db)
skuNamesInfo.TotalCount = dao.GetLastTotalRowCount2(db, txDB)
sql += " AND (1 = 0"
for _, v := range storeNameList {
sql += " OR (t1.id = ? AND t3.id = ?)"