xuzhiheng 4 years ago
parent
commit
d9ebaba04f
1 changed files with 2 additions and 0 deletions
  1. 2 0
      utils/api_util.go

+ 2 - 0
utils/api_util.go

@@ -112,6 +112,8 @@ func Check(appID string, productID int, c *gin.Context, getData func() ([]map[st
 	} else {
 		if strings.Contains(errStr, "不足") {
 			response.FailWithDetailed(response.LeftNumEmpty, nil, errStr, c)
+		} else if strings.Contains(errStr, "查询") {
+			response.FailWithDetailed(response.EmptyResult, nil, errStr, c)
 		} else {
 			global.Logger.Error("数据库操作失败", zap.Any("error:", err))
 			response.FailWithDetailed(response.QueryError, nil, "内部错误", c)