- fix bug in ReorderCategories

This commit is contained in:
gazebo
2018-12-20 18:17:40 +08:00
parent 0750f831c4
commit 2952b3f3b5

View File

@@ -93,7 +93,11 @@ func (p *PurchaseHandler) ReorderCategories(db *dao.DaoDB, parentCatID int, user
parentJDID = cat.JdID
}
var cats []*model.SkuCategory
if err = dao.GetRows(db, &cats, "SELECT * FROM sku_category WHERE parent_id = ? ORDER BY seq", parentCatID); err == nil {
if err = dao.GetRows(db, &cats, `
SELECT *
FROM sku_category
WHERE parent_id = ? AND deleted_at = ?
ORDER BY seq`, parentCatID, utils.DefaultTimeValue); err == nil {
jdCatIDs := make([]int64, len(cats))
for k, v := range cats {
jdCatIDs[k] = v.JdID