Re-migrate code

This commit is contained in:
2026-03-02 10:05:12 +08:00
parent d1e6f15745
commit 51025195a5
7 changed files with 177 additions and 0 deletions

View File

@@ -198,3 +198,25 @@ func (c *CompaniesController) Delete(ctx *gin.Context) {
"message": "企业删除成功",
})
}
// StatsOverview 获取企业统计概览
// @Summary 获取企业统计概览
// @Description 获取企业、企业赋码、员工赋码的统计数据
// @Tags 企业管理
// @Produce json
// @Security BearerAuth
// @Success 200 {object} models.DataResponse
// @Failure 401 {object} models.ErrorResponse
// @Failure 500 {object} models.ErrorResponse
// @Router /companies/stats/overview [get]
func (c *CompaniesController) StatsOverview(ctx *gin.Context) {
stats, err := c.companiesService.GetStatsOverview()
if err != nil {
ErrorResponse(ctx, http.StatusInternalServerError, err.Error())
return
}
SuccessResponse(ctx, "获取企业统计概览成功", gin.H{
"overview": stats,
})
}