refactor🎨: 修改错误信息提示

This commit is contained in:
zhangwenjian committed 2021-06-29 16:33:03 +08:00
1 parent f80e64688e
commit dd5f0c52fb
15 files changed
+92 -76

No files matched your search

+1 -1
View File
@@ -49,7 +49,7 @@ func IndexAction(m models.ActiveRecord, d dto.Index, f func() interface{}) gin.H
Count(&count).Error
if err != nil && !errors.Is(err, gorm.ErrRecordNotFound) {
log.Errorf("MsgID[%s] Index error: %s", msgID, err)
response.Error(c, http.StatusInternalServerError, err, "查询失败")
response.Error(c, 500, err, "查询失败")
return
}
response.PageOK(c, list, int(count), req.GetPageIndex(), req.GetPageSize(), "查询成功")