修复SaveUserCart中没有结束事务的bug

This commit is contained in:
gazebo
2019-10-24 15:34:33 +08:00
parent 63e82b35ab
commit 81188aeb88

View File

@@ -683,6 +683,9 @@ func SaveUserCart(ctx *jxcontext.Context, userID string, storeID int, cartItems
if len(cartItems) > 0 {
err = dao.CreateMultiEntities(dao.GetDB(), cartItems)
}
if err == nil {
dao.Commit(db)
}
return err
}