Skip to content

Commit

Permalink
123
Browse files Browse the repository at this point in the history
  • Loading branch information
ymakedaq committed Sep 13, 2024
1 parent 859e6ea commit bc12faa
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ type CountGroupbyResourceTypeResult struct {
// CountGroupbyResourceType count groupby resource type
func (s *Handler) CountGroupbyResourceType(c *gin.Context) {
var data []CountGroupbyResourceTypeResult
err := model.DB.Self.Table(model.TbRpDetailName()).Select("rs_type, count(*) as count").Group("rs_type").Find(&data).
Error
err := model.DB.Self.Table(model.TbRpDetailName()).
Select("rs_type, count(*) as count").Group("rs_type").
Find(&data, "status = ? ", model.Unused).Error
if err != nil {
logger.Error("query failed %s", err.Error)
s.SendResponse(c, err, err.Error(), "")
Expand Down

0 comments on commit bc12faa

Please sign in to comment.