feat: add manager list page in console page

This commit is contained in:
RockYang
2024-03-21 15:24:28 +08:00
parent 79b7fee47c
commit 41ae411f9b
9 changed files with 367 additions and 10 deletions

View File

@@ -108,7 +108,7 @@ func (h *ProductHandler) Enable(c *gin.Context) {
return
}
res := h.DB.Model(&model.Product{}).Where("id = ?", data.Id).Update("enabled", data.Enabled)
res := h.DB.Model(&model.Product{}).Where("id", data.Id).UpdateColumn("enabled", data.Enabled)
if res.Error != nil {
resp.ERROR(c, "更新数据库失败!")
return