Re-migrate code
This commit is contained in:
@@ -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,
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user