兼容批量删除

This commit is contained in:
linwenxiang committed 2020-09-03 21:04:17 +08:00
1 parent 560e650070
commit 0ae41f247c
5 files changed
+28 -7

No files matched your search

+1 -1
View File
@@ -37,7 +37,7 @@ func ViewAction(control dto.Control) gin.HandlerFunc {
err = db.WithContext(c).Scopes(
Permission(object.TableName(), p),
).First(object).Error
).Where(req.GetId()).First(object).Error
if errors.Is(err, gorm.ErrRecordNotFound) {
tools.HasError(err, "查看失败", 404)
}