mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2025-09-26 20:21:19 +08:00
注释
This commit is contained in:
@@ -23,30 +23,30 @@ type MonitorClientHandler struct {
|
|||||||
requestGroup singleflight.Group
|
requestGroup singleflight.Group
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 监控-客户端信息列表
|
// @Summary 监控-客户端信息列表
|
||||||
// @Tags monitor_client-监控-客户端信息
|
// @Tags monitor_client-监控-客户端信息
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param Token header string true "token"
|
// @Param Token header string true "token"
|
||||||
// @Param PageNo query int true "页码"
|
// @Param PageNo query int true "页码"
|
||||||
// @Param PageSize query int true "每页数量"
|
// @Param PageSize query int true "每页数量"
|
||||||
// @Param ProjectKey query string false "项目key"
|
// @Param ProjectKey query string false "项目key"
|
||||||
// @Param ClientId query string false "sdk生成的客户端id"
|
// @Param ClientId query string false "sdk生成的客户端id"
|
||||||
// @Param UserId query string false "用户id"
|
// @Param UserId query string false "用户id"
|
||||||
// @Param Os query string false "系统"
|
// @Param Os query string false "系统"
|
||||||
// @Param Browser query string false "浏览器"
|
// @Param Browser query string false "浏览器"
|
||||||
// @Param Country query string false "国家"
|
// @Param Country query string false "国家"
|
||||||
// @Param Province query string false "省份"
|
// @Param Province query string false "省份"
|
||||||
// @Param City query string false "城市"
|
// @Param City query string false "城市"
|
||||||
// @Param Operator query string false "电信运营商"
|
// @Param Operator query string false "电信运营商"
|
||||||
// @Param Ip query string false "ip"
|
// @Param Ip query string false "ip"
|
||||||
// @Param Width query number false "屏幕"
|
// @Param Width query number false "屏幕"
|
||||||
// @Param Height query number false "屏幕高度"
|
// @Param Height query number false "屏幕高度"
|
||||||
// @Param Ua query string false "ua记录"
|
// @Param Ua query string false "ua记录"
|
||||||
// @Param CreateTimeStart query string false "创建时间"
|
// @Param CreateTimeStart query string false "创建时间"
|
||||||
// @Param CreateTimeEnd query string false "创建时间"
|
// @Param CreateTimeEnd query string false "创建时间"
|
||||||
//
|
//
|
||||||
// @Success 200 {object} response.Response{ data=response.PageResp{ lists=[]MonitorClientResp}} "成功"
|
// @Success 200 {object} response.Response{ data=response.PageResp{ lists=[]MonitorClientResp}} "成功"
|
||||||
// @Router /api/admin/monitor_client/list [get]
|
// @Router /api/admin/monitor_client/list [get]
|
||||||
func (hd *MonitorClientHandler) List(c *gin.Context) {
|
func (hd *MonitorClientHandler) List(c *gin.Context) {
|
||||||
var page request.PageReq
|
var page request.PageReq
|
||||||
var listReq MonitorClientListReq
|
var listReq MonitorClientListReq
|
||||||
@@ -60,27 +60,26 @@ func (hd *MonitorClientHandler) List(c *gin.Context) {
|
|||||||
response.CheckAndRespWithData(c, res, err)
|
response.CheckAndRespWithData(c, res, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 监控-客户端信息列表-所有
|
// @Summary 监控-客户端信息列表-所有
|
||||||
// @Tags monitor_client-监控-客户端信息
|
// @Tags monitor_client-监控-客户端信息
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param ProjectKey query string false "项目key"
|
// @Param ProjectKey query string false "项目key"
|
||||||
// @Param ClientId query string false "sdk生成的客户端id"
|
// @Param ClientId query string false "sdk生成的客户端id"
|
||||||
// @Param UserId query string false "用户id"
|
// @Param UserId query string false "用户id"
|
||||||
// @Param Os query string false "系统"
|
// @Param Os query string false "系统"
|
||||||
// @Param Browser query string false "浏览器"
|
// @Param Browser query string false "浏览器"
|
||||||
// @Param Country query string false "国家"
|
// @Param Country query string false "国家"
|
||||||
// @Param Province query string false "省份"
|
// @Param Province query string false "省份"
|
||||||
// @Param City query string false "城市"
|
// @Param City query string false "城市"
|
||||||
// @Param Operator query string false "电信运营商"
|
// @Param Operator query string false "电信运营商"
|
||||||
// @Param Ip query string false "ip"
|
// @Param Ip query string false "ip"
|
||||||
// @Param Width query number
|
// @Param Width query number false "屏幕"
|
||||||
// @Param Width query number false "屏幕"
|
// @Param Height query number false "屏幕高度"
|
||||||
// @Param Height query number false "屏幕高度"
|
// @Param Ua query string false "ua记录"
|
||||||
// @Param Ua query string false "ua记录"
|
// @Param CreateTimeStart query string false "创建时间"
|
||||||
// @Param CreateTimeStart query string false "创建时间"
|
// @Param CreateTimeEnd query string false "创建时间"
|
||||||
// @Param CreateTimeEnd query string false "创建时间"
|
// @Success 200 {object} response.Response{ data=[]MonitorClientResp} "成功"
|
||||||
// @Success 200 {object} response.Response{ data=[]MonitorClientResp} "成功"
|
// @Router /api/admin/monitor_client/listAll [get]
|
||||||
// @Router /api/admin/monitor_client/listAll [get]
|
|
||||||
func (hd *MonitorClientHandler) ListAll(c *gin.Context) {
|
func (hd *MonitorClientHandler) ListAll(c *gin.Context) {
|
||||||
var listReq MonitorClientListReq
|
var listReq MonitorClientListReq
|
||||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &listReq)) {
|
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &listReq)) {
|
||||||
@@ -99,13 +98,13 @@ func (hd *MonitorClientHandler) ErrorUsers(c *gin.Context) {
|
|||||||
response.CheckAndRespWithData(c, res, err)
|
response.CheckAndRespWithData(c, res, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 监控-客户端信息详情
|
// @Summary 监控-客户端信息详情
|
||||||
// @Tags monitor_client-监控-客户端信息
|
// @Tags monitor_client-监控-客户端信息
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param Token header string true "token"
|
// @Param Token header string true "token"
|
||||||
// @Param Id query number false "uuid"
|
// @Param Id query number false "uuid"
|
||||||
// @Success 200 {object} response.Response{ data=MonitorClientResp} "成功"
|
// @Success 200 {object} response.Response{ data=MonitorClientResp} "成功"
|
||||||
// @Router /api/admin/monitor_client/detail [get]
|
// @Router /api/admin/monitor_client/detail [get]
|
||||||
func (hd *MonitorClientHandler) Detail(c *gin.Context) {
|
func (hd *MonitorClientHandler) Detail(c *gin.Context) {
|
||||||
var detailReq MonitorClientDetailReq
|
var detailReq MonitorClientDetailReq
|
||||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &detailReq)) {
|
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &detailReq)) {
|
||||||
@@ -119,25 +118,25 @@ func (hd *MonitorClientHandler) Detail(c *gin.Context) {
|
|||||||
response.CheckAndRespWithData(c, res, err)
|
response.CheckAndRespWithData(c, res, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 监控-客户端信息新增
|
// @Summary 监控-客户端信息新增
|
||||||
// @Tags monitor_client-监控-客户端信息
|
// @Tags monitor_client-监控-客户端信息
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param Token header string true "token"
|
// @Param Token header string true "token"
|
||||||
// @Param ProjectKey body string false "项目key"
|
// @Param ProjectKey body string false "项目key"
|
||||||
// @Param ClientId body string false "sdk生成的客户端id"
|
// @Param ClientId body string false "sdk生成的客户端id"
|
||||||
// @Param UserId body string false "用户id"
|
// @Param UserId body string false "用户id"
|
||||||
// @Param Os body string false "系统"
|
// @Param Os body string false "系统"
|
||||||
// @Param Browser body string false "浏览器"
|
// @Param Browser body string false "浏览器"
|
||||||
// @Param Country query string false "国家"
|
// @Param Country query string false "国家"
|
||||||
// @Param Province query string false "省份"
|
// @Param Province query string false "省份"
|
||||||
// @Param City query string false "城市"
|
// @Param City query string false "城市"
|
||||||
// @Param Operator query string false "电信运营商"
|
// @Param Operator query string false "电信运营商"
|
||||||
// @Param Ip query string false "ip"
|
// @Param Ip query string false "ip"
|
||||||
// @Param Width body number false "屏幕"
|
// @Param Width body number false "屏幕"
|
||||||
// @Param Height body number false "屏幕高度"
|
// @Param Height body number false "屏幕高度"
|
||||||
// @Param Ua body string false "ua记录"
|
// @Param Ua body string false "ua记录"
|
||||||
// @Success 200 {object} response.Response "成功"
|
// @Success 200 {object} response.Response "成功"
|
||||||
// @Router /api/admin/monitor_client/add [post]
|
// @Router /api/admin/monitor_client/add [post]
|
||||||
func (hd *MonitorClientHandler) Add(c *gin.Context) {
|
func (hd *MonitorClientHandler) Add(c *gin.Context) {
|
||||||
data, err := url.QueryUnescape(c.Query("data"))
|
data, err := url.QueryUnescape(c.Query("data"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -190,13 +189,13 @@ func (hd *MonitorClientHandler) Add(c *gin.Context) {
|
|||||||
c.Data(200, "image/gif", img_util.EmptyGif())
|
c.Data(200, "image/gif", img_util.EmptyGif())
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 监控-客户端信息删除
|
// @Summary 监控-客户端信息删除
|
||||||
// @Tags monitor_client-监控-客户端信息
|
// @Tags monitor_client-监控-客户端信息
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param Token header string true "token"
|
// @Param Token header string true "token"
|
||||||
// @Param Id body number false "uuid"
|
// @Param Id body number false "uuid"
|
||||||
// @Success 200 {object} response.Response "成功"
|
// @Success 200 {object} response.Response "成功"
|
||||||
// @Router /api/admin/monitor_client/del [post]
|
// @Router /api/admin/monitor_client/del [post]
|
||||||
func (hd *MonitorClientHandler) Del(c *gin.Context) {
|
func (hd *MonitorClientHandler) Del(c *gin.Context) {
|
||||||
var delReq MonitorClientDelReq
|
var delReq MonitorClientDelReq
|
||||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &delReq)) {
|
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &delReq)) {
|
||||||
@@ -205,14 +204,14 @@ func (hd *MonitorClientHandler) Del(c *gin.Context) {
|
|||||||
response.CheckAndResp(c, MonitorClientService.Del(delReq.Id))
|
response.CheckAndResp(c, MonitorClientService.Del(delReq.Id))
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 监控-客户端信息删除-批量
|
// @Summary 监控-客户端信息删除-批量
|
||||||
// @Tags monitor_client-监控-客户端信息
|
// @Tags monitor_client-监控-客户端信息
|
||||||
//
|
//
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param Token header string true "token"
|
// @Param Token header string true "token"
|
||||||
// @Param Ids body string false "逗号分割的id"
|
// @Param Ids body string false "逗号分割的id"
|
||||||
// @Success 200 {object} response.Response "成功"
|
// @Success 200 {object} response.Response "成功"
|
||||||
// @Router /api/admin/monitor_client/delBatch [post]
|
// @Router /api/admin/monitor_client/delBatch [post]
|
||||||
func (hd *MonitorClientHandler) DelBatch(c *gin.Context) {
|
func (hd *MonitorClientHandler) DelBatch(c *gin.Context) {
|
||||||
var delReq MonitorClientDelBatchReq
|
var delReq MonitorClientDelBatchReq
|
||||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &delReq)) {
|
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &delReq)) {
|
||||||
@@ -227,26 +226,26 @@ func (hd *MonitorClientHandler) DelBatch(c *gin.Context) {
|
|||||||
response.CheckAndResp(c, MonitorClientService.DelBatch(Ids))
|
response.CheckAndResp(c, MonitorClientService.DelBatch(Ids))
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 监控-客户端信息导出
|
// @Summary 监控-客户端信息导出
|
||||||
// @Tags monitor_client-监控-客户端信息
|
// @Tags monitor_client-监控-客户端信息
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param Token header string true "token"
|
// @Param Token header string true "token"
|
||||||
// @Param ProjectKey query string false "项目key"
|
// @Param ProjectKey query string false "项目key"
|
||||||
// @Param ClientId query string false "sdk生成的客户端id"
|
// @Param ClientId query string false "sdk生成的客户端id"
|
||||||
// @Param UserId query string false "用户id"
|
// @Param UserId query string false "用户id"
|
||||||
// @Param Os query string false "系统"
|
// @Param Os query string false "系统"
|
||||||
// @Param Browser query string false "浏览器"
|
// @Param Browser query string false "浏览器"
|
||||||
// @Param Country query string false "国家"
|
// @Param Country query string false "国家"
|
||||||
// @Param Province query string false "省份"
|
// @Param Province query string false "省份"
|
||||||
// @Param City query string false "城市"
|
// @Param City query string false "城市"
|
||||||
// @Param Operator query string false "电信运营商"
|
// @Param Operator query string false "电信运营商"
|
||||||
// @Param Ip query string false "ip"
|
// @Param Ip query string false "ip"
|
||||||
// @Param Width query number false "屏幕"
|
// @Param Width query number false "屏幕"
|
||||||
// @Param Height query number false "屏幕高度"
|
// @Param Height query number false "屏幕高度"
|
||||||
// @Param Ua query string false "ua记录"
|
// @Param Ua query string false "ua记录"
|
||||||
// @Param CreateTimeStart query string false "创建时间"
|
// @Param CreateTimeStart query string false "创建时间"
|
||||||
// @Param CreateTimeEnd query string false "创建时间"
|
// @Param CreateTimeEnd query string false "创建时间"
|
||||||
// @Router /api/admin/monitor_client/ExportFile [get]
|
// @Router /api/admin/monitor_client/ExportFile [get]
|
||||||
func (hd *MonitorClientHandler) ExportFile(c *gin.Context) {
|
func (hd *MonitorClientHandler) ExportFile(c *gin.Context) {
|
||||||
var listReq MonitorClientListReq
|
var listReq MonitorClientListReq
|
||||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &listReq)) {
|
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &listReq)) {
|
||||||
@@ -265,10 +264,10 @@ func (hd *MonitorClientHandler) ExportFile(c *gin.Context) {
|
|||||||
excel2.DownLoadExcel("监控-客户端信息"+time.Now().Format("20060102-150405"), c.Writer, f)
|
excel2.DownLoadExcel("监控-客户端信息"+time.Now().Format("20060102-150405"), c.Writer, f)
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 监控-客户端信息导入
|
// @Summary 监控-客户端信息导入
|
||||||
// @Tags monitor_client-监控-客户端信息
|
// @Tags monitor_client-监控-客户端信息
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Router /api/admin/monitor_client/ImportFile [post]
|
// @Router /api/admin/monitor_client/ImportFile [post]
|
||||||
func (hd *MonitorClientHandler) ImportFile(c *gin.Context) {
|
func (hd *MonitorClientHandler) ImportFile(c *gin.Context) {
|
||||||
file, _, err := c.Request.FormFile("file")
|
file, _, err := c.Request.FormFile("file")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@@ -21,22 +21,22 @@ type MonitorSlowHandler struct {
|
|||||||
requestGroup singleflight.Group
|
requestGroup singleflight.Group
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 监控-错误列列表
|
// @Summary 监控-错误列列表
|
||||||
// @Tags monitor_slow-监控-错误列
|
// @Tags monitor_slow-监控-错误列
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param Token header string true "token"
|
// @Param Token header string true "token"
|
||||||
// @Param PageNo query int true "页码"
|
// @Param PageNo query int true "页码"
|
||||||
// @Param PageSize query int true "每页数量"
|
// @Param PageSize query int true "每页数量"
|
||||||
// @Param ProjectKey query string false "项目key"
|
// @Param ProjectKey query string false "项目key"
|
||||||
// @Param ClientId query string false "sdk生成的客户端id"
|
// @Param ClientId query string false "sdk生成的客户端id"
|
||||||
// @Param UserId query string false "用户id"
|
// @Param UserId query string false "用户id"
|
||||||
// @Param Path query string false "URL地址"
|
// @Param Path query string false "URL地址"
|
||||||
// @Param Time query number false "时间"
|
// @Param Time query number false "时间"
|
||||||
// @Param CreateTimeStart query string false "创建时间"
|
// @Param CreateTimeStart query string false "创建时间"
|
||||||
// @Param CreateTimeEnd query string false "创建时间"
|
// @Param CreateTimeEnd query string false "创建时间"
|
||||||
//
|
//
|
||||||
// @Success 200 {object} response.Response{ data=response.PageResp{ lists=[]MonitorSlowResp}} "成功"
|
// @Success 200 {object} response.Response{ data=response.PageResp{ lists=[]MonitorSlowResp}} "成功"
|
||||||
// @Router /api/admin/monitor_slow/list [get]
|
// @Router /api/admin/monitor_slow/list [get]
|
||||||
func (hd *MonitorSlowHandler) List(c *gin.Context) {
|
func (hd *MonitorSlowHandler) List(c *gin.Context) {
|
||||||
var page request.PageReq
|
var page request.PageReq
|
||||||
var listReq MonitorSlowListReq
|
var listReq MonitorSlowListReq
|
||||||
@@ -50,18 +50,18 @@ func (hd *MonitorSlowHandler) List(c *gin.Context) {
|
|||||||
response.CheckAndRespWithData(c, res, err)
|
response.CheckAndRespWithData(c, res, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 监控-错误列列表-所有
|
// @Summary 监控-错误列列表-所有
|
||||||
// @Tags monitor_slow-监控-错误列
|
// @Tags monitor_slow-监控-错误列
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param ProjectKey query string false "项目key"
|
// @Param ProjectKey query string false "项目key"
|
||||||
// @Param ClientId query string false "sdk生成的客户端id"
|
// @Param ClientId query string false "sdk生成的客户端id"
|
||||||
// @Param UserId query string false "用户id"
|
// @Param UserId query string false "用户id"
|
||||||
// @Param Path query string false "URL地址"
|
// @Param Path query string false "URL地址"
|
||||||
// @Param Time query number false "时间"
|
// @Param Time query number false "时间"
|
||||||
// @Param CreateTimeStart query string false "创建时间"
|
// @Param CreateTimeStart query string false "创建时间"
|
||||||
// @Param CreateTimeEnd query string false "创建时间"
|
// @Param CreateTimeEnd query string false "创建时间"
|
||||||
// @Success 200 {object} response.Response{ data=[]MonitorSlowResp} "成功"
|
// @Success 200 {object} response.Response{ data=[]MonitorSlowResp} "成功"
|
||||||
// @Router /api/admin/monitor_slow/listAll [get]
|
// @Router /api/admin/monitor_slow/listAll [get]
|
||||||
func (hd *MonitorSlowHandler) ListAll(c *gin.Context) {
|
func (hd *MonitorSlowHandler) ListAll(c *gin.Context) {
|
||||||
var listReq MonitorSlowListReq
|
var listReq MonitorSlowListReq
|
||||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &listReq)) {
|
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &listReq)) {
|
||||||
@@ -71,13 +71,13 @@ func (hd *MonitorSlowHandler) ListAll(c *gin.Context) {
|
|||||||
response.CheckAndRespWithData(c, res, err)
|
response.CheckAndRespWithData(c, res, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 监控-错误列详情
|
// @Summary 监控-错误列详情
|
||||||
// @Tags monitor_slow-监控-错误列
|
// @Tags monitor_slow-监控-错误列
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param Token header string true "token"
|
// @Param Token header string true "token"
|
||||||
// @Param Id query number false "错误id"
|
// @Param Id query number false "错误id"
|
||||||
// @Success 200 {object} response.Response{ data=MonitorSlowResp} "成功"
|
// @Success 200 {object} response.Response{ data=MonitorSlowResp} "成功"
|
||||||
// @Router /api/admin/monitor_slow/detail [get]
|
// @Router /api/admin/monitor_slow/detail [get]
|
||||||
func (hd *MonitorSlowHandler) Detail(c *gin.Context) {
|
func (hd *MonitorSlowHandler) Detail(c *gin.Context) {
|
||||||
var detailReq MonitorSlowDetailReq
|
var detailReq MonitorSlowDetailReq
|
||||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &detailReq)) {
|
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &detailReq)) {
|
||||||
@@ -91,17 +91,11 @@ func (hd *MonitorSlowHandler) Detail(c *gin.Context) {
|
|||||||
response.CheckAndRespWithData(c, res, err)
|
response.CheckAndRespWithData(c, res, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 监控-错误列新增
|
// @Summary 监控-错误列新增
|
||||||
// @Tags monitor_slow-监控-错误列
|
// @Tags monitor_slow-监控-错误列
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param Token header string true "token"
|
// @Success 200 {object} response.Response "成功"
|
||||||
// @Param ProjectKey body string false "项目key"
|
// @Router /api/admin/monitor_slow/add [get]
|
||||||
// @Param ClientId body string false "sdk生成的客户端id"
|
|
||||||
// @Param UserId body string false "用户id"
|
|
||||||
// @Param Path body string false "URL地址"
|
|
||||||
// @Param Time body number false "时间"
|
|
||||||
// @Success 200 {object} response.Response "成功"
|
|
||||||
// @Router /api/admin/monitor_slow/add [post]
|
|
||||||
func (hd *MonitorSlowHandler) Add(c *gin.Context) {
|
func (hd *MonitorSlowHandler) Add(c *gin.Context) {
|
||||||
data, err := url.QueryUnescape(c.Query("data"))
|
data, err := url.QueryUnescape(c.Query("data"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -116,18 +110,18 @@ func (hd *MonitorSlowHandler) Add(c *gin.Context) {
|
|||||||
c.Data(200, "image/gif", img_util.EmptyGif())
|
c.Data(200, "image/gif", img_util.EmptyGif())
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 监控-错误列编辑
|
// @Summary 监控-错误列编辑
|
||||||
// @Tags monitor_slow-监控-错误列
|
// @Tags monitor_slow-监控-错误列
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param Token header string true "token"
|
// @Param Token header string true "token"
|
||||||
// @Param Id body number false "错误id"
|
// @Param Id body number false "错误id"
|
||||||
// @Param ProjectKey body string false "项目key"
|
// @Param ProjectKey body string false "项目key"
|
||||||
// @Param ClientId body string false "sdk生成的客户端id"
|
// @Param ClientId body string false "sdk生成的客户端id"
|
||||||
// @Param UserId body string false "用户id"
|
// @Param UserId body string false "用户id"
|
||||||
// @Param Path body string false "URL地址"
|
// @Param Path body string false "URL地址"
|
||||||
// @Param Time body number false "时间"
|
// @Param Time body number false "时间"
|
||||||
// @Success 200 {object} response.Response "成功"
|
// @Success 200 {object} response.Response "成功"
|
||||||
// @Router /api/admin/monitor_slow/edit [post]
|
// @Router /api/admin/monitor_slow/edit [post]
|
||||||
func (hd *MonitorSlowHandler) Edit(c *gin.Context) {
|
func (hd *MonitorSlowHandler) Edit(c *gin.Context) {
|
||||||
var editReq MonitorSlowEditReq
|
var editReq MonitorSlowEditReq
|
||||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &editReq)) {
|
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &editReq)) {
|
||||||
@@ -136,13 +130,13 @@ func (hd *MonitorSlowHandler) Edit(c *gin.Context) {
|
|||||||
response.CheckAndRespWithData(c, editReq.Id, MonitorSlowService.Edit(editReq))
|
response.CheckAndRespWithData(c, editReq.Id, MonitorSlowService.Edit(editReq))
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 监控-错误列删除
|
// @Summary 监控-错误列删除
|
||||||
// @Tags monitor_slow-监控-错误列
|
// @Tags monitor_slow-监控-错误列
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param Token header string true "token"
|
// @Param Token header string true "token"
|
||||||
// @Param Id body number false "错误id"
|
// @Param Id body number false "错误id"
|
||||||
// @Success 200 {object} response.Response "成功"
|
// @Success 200 {object} response.Response "成功"
|
||||||
// @Router /api/admin/monitor_slow/del [post]
|
// @Router /api/admin/monitor_slow/del [post]
|
||||||
func (hd *MonitorSlowHandler) Del(c *gin.Context) {
|
func (hd *MonitorSlowHandler) Del(c *gin.Context) {
|
||||||
var delReq MonitorSlowDelReq
|
var delReq MonitorSlowDelReq
|
||||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &delReq)) {
|
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &delReq)) {
|
||||||
@@ -154,11 +148,11 @@ func (hd *MonitorSlowHandler) Del(c *gin.Context) {
|
|||||||
// @Summary 监控-错误列删除-批量
|
// @Summary 监控-错误列删除-批量
|
||||||
// @Tags monitor_slow-监控-错误列
|
// @Tags monitor_slow-监控-错误列
|
||||||
//
|
//
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param Token header string true "token"
|
// @Param Token header string true "token"
|
||||||
// @Param Ids body string false "逗号分割的id"
|
// @Param Ids body string false "逗号分割的id"
|
||||||
// @Success 200 {object} response.Response "成功"
|
// @Success 200 {object} response.Response "成功"
|
||||||
// @Router /api/admin/monitor_slow/delBatch [post]
|
// @Router /api/admin/monitor_slow/delBatch [post]
|
||||||
func (hd *MonitorSlowHandler) DelBatch(c *gin.Context) {
|
func (hd *MonitorSlowHandler) DelBatch(c *gin.Context) {
|
||||||
var delReq MonitorSlowDelBatchReq
|
var delReq MonitorSlowDelBatchReq
|
||||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &delReq)) {
|
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &delReq)) {
|
||||||
@@ -173,18 +167,18 @@ func (hd *MonitorSlowHandler) DelBatch(c *gin.Context) {
|
|||||||
response.CheckAndResp(c, MonitorSlowService.DelBatch(Ids))
|
response.CheckAndResp(c, MonitorSlowService.DelBatch(Ids))
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 监控-错误列导出
|
// @Summary 监控-错误列导出
|
||||||
// @Tags monitor_slow-监控-错误列
|
// @Tags monitor_slow-监控-错误列
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param Token header string true "token"
|
// @Param Token header string true "token"
|
||||||
// @Param ProjectKey query string false "项目key"
|
// @Param ProjectKey query string false "项目key"
|
||||||
// @Param ClientId query string false "sdk生成的客户端id"
|
// @Param ClientId query string false "sdk生成的客户端id"
|
||||||
// @Param UserId query string false "用户id"
|
// @Param UserId query string false "用户id"
|
||||||
// @Param Path query string false "URL地址"
|
// @Param Path query string false "URL地址"
|
||||||
// @Param Time query number false "时间"
|
// @Param Time query number false "时间"
|
||||||
// @Param CreateTimeStart query string false "创建时间"
|
// @Param CreateTimeStart query string false "创建时间"
|
||||||
// @Param CreateTimeEnd query string false "创建时间"
|
// @Param CreateTimeEnd query string false "创建时间"
|
||||||
// @Router /api/admin/monitor_slow/ExportFile [get]
|
// @Router /api/admin/monitor_slow/ExportFile [get]
|
||||||
func (hd *MonitorSlowHandler) ExportFile(c *gin.Context) {
|
func (hd *MonitorSlowHandler) ExportFile(c *gin.Context) {
|
||||||
var listReq MonitorSlowListReq
|
var listReq MonitorSlowListReq
|
||||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &listReq)) {
|
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &listReq)) {
|
||||||
@@ -203,10 +197,10 @@ func (hd *MonitorSlowHandler) ExportFile(c *gin.Context) {
|
|||||||
excel2.DownLoadExcel("监控-错误列"+time.Now().Format("20060102-150405"), c.Writer, f)
|
excel2.DownLoadExcel("监控-错误列"+time.Now().Format("20060102-150405"), c.Writer, f)
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 监控-错误列导入
|
// @Summary 监控-错误列导入
|
||||||
// @Tags monitor_slow-监控-错误列
|
// @Tags monitor_slow-监控-错误列
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Router /api/admin/monitor_slow/ImportFile [post]
|
// @Router /api/admin/monitor_slow/ImportFile [post]
|
||||||
func (hd *MonitorSlowHandler) ImportFile(c *gin.Context) {
|
func (hd *MonitorSlowHandler) ImportFile(c *gin.Context) {
|
||||||
file, _, err := c.Request.FormFile("file")
|
file, _, err := c.Request.FormFile("file")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@@ -18,22 +18,22 @@ type UserProtocolHandler struct {
|
|||||||
requestGroup singleflight.Group
|
requestGroup singleflight.Group
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 用户协议列表
|
// @Summary 用户协议列表
|
||||||
// @Tags user_protocol-用户协议
|
// @Tags user_protocol-用户协议
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param Token header string true "token"
|
// @Param Token header string true "token"
|
||||||
// @Param PageNo query int true "页码"
|
// @Param PageNo query int true "页码"
|
||||||
// @Param PageSize query int true "每页数量"
|
// @Param PageSize query int true "每页数量"
|
||||||
// @Param Title query string false "标题"
|
// @Param Title query string false "标题"
|
||||||
// @Param Content query string false "协议内容"
|
// @Param Content query string false "协议内容"
|
||||||
// @Param Sort query number false "排序"
|
// @Param Sort query number false "排序"
|
||||||
// @Param CreateTimeStart query string false "创建时间"
|
// @Param CreateTimeStart query string false "创建时间"
|
||||||
// @Param CreateTimeEnd query string false "创建时间"
|
// @Param CreateTimeEnd query string false "创建时间"
|
||||||
// @Param UpdateTimeStart query string false "更新时间"
|
// @Param UpdateTimeStart query string false "更新时间"
|
||||||
// @Param UpdateTimeEnd query string false "更新时间"
|
// @Param UpdateTimeEnd query string false "更新时间"
|
||||||
//
|
//
|
||||||
// @Success 200 {object} response.Response{ data=response.PageResp{ lists=[]UserProtocolResp}} "成功"
|
// @Success 200 {object} response.Response{ data=response.PageResp{ lists=[]UserProtocolResp}} "成功"
|
||||||
// @Router /api/admin/user_protocol/list [get]
|
// @Router /api/admin/user_protocol/list [get]
|
||||||
func (hd *UserProtocolHandler) List(c *gin.Context) {
|
func (hd *UserProtocolHandler) List(c *gin.Context) {
|
||||||
var page request.PageReq
|
var page request.PageReq
|
||||||
var listReq UserProtocolListReq
|
var listReq UserProtocolListReq
|
||||||
@@ -47,18 +47,18 @@ func (hd *UserProtocolHandler) List(c *gin.Context) {
|
|||||||
response.CheckAndRespWithData(c, res, err)
|
response.CheckAndRespWithData(c, res, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 用户协议列表-所有
|
// @Summary 用户协议列表-所有
|
||||||
// @Tags user_protocol-用户协议
|
// @Tags user_protocol-用户协议
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param Title query string false "标题"
|
// @Param Title query string false "标题"
|
||||||
// @Param Content query string false "协议内容"
|
// @Param Content query string false "协议内容"
|
||||||
// @Param Sort query number false "排序"
|
// @Param Sort query number false "排序"
|
||||||
// @Param CreateTimeStart query string false "创建时间"
|
// @Param CreateTimeStart query string false "创建时间"
|
||||||
// @Param CreateTimeEnd query string false "创建时间"
|
// @Param CreateTimeEnd query string false "创建时间"
|
||||||
// @Param UpdateTimeStart query string false "更新时间"
|
// @Param UpdateTimeStart query string false "更新时间"
|
||||||
// @Param UpdateTimeEnd query string false "更新时间"
|
// @Param UpdateTimeEnd query string false "更新时间"
|
||||||
// @Success 200 {object} response.Response{ data=[]UserProtocolResp} "成功"
|
// @Success 200 {object} response.Response{ data=[]UserProtocolResp} "成功"
|
||||||
// @Router /api/admin/user_protocol/listAll [get]
|
// @Router /api/admin/user_protocol/listAll [get]
|
||||||
func (hd *UserProtocolHandler) ListAll(c *gin.Context) {
|
func (hd *UserProtocolHandler) ListAll(c *gin.Context) {
|
||||||
var listReq UserProtocolListReq
|
var listReq UserProtocolListReq
|
||||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &listReq)) {
|
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &listReq)) {
|
||||||
@@ -68,13 +68,13 @@ func (hd *UserProtocolHandler) ListAll(c *gin.Context) {
|
|||||||
response.CheckAndRespWithData(c, res, err)
|
response.CheckAndRespWithData(c, res, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 用户协议详情
|
// @Summary 用户协议详情
|
||||||
// @Tags user_protocol-用户协议
|
// @Tags user_protocol-用户协议
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param Token header string true "token"
|
// @Param Token header string true "token"
|
||||||
// @Param Id query number false ""
|
// @Param Id query number false "Id"
|
||||||
// @Success 200 {object} response.Response{ data=UserProtocolResp} "成功"
|
// @Success 200 {object} response.Response{ data=UserProtocolResp} "成功"
|
||||||
// @Router /api/admin/user_protocol/detail [get]
|
// @Router /api/admin/user_protocol/detail [get]
|
||||||
func (hd *UserProtocolHandler) Detail(c *gin.Context) {
|
func (hd *UserProtocolHandler) Detail(c *gin.Context) {
|
||||||
var detailReq UserProtocolDetailReq
|
var detailReq UserProtocolDetailReq
|
||||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &detailReq)) {
|
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &detailReq)) {
|
||||||
@@ -88,15 +88,15 @@ func (hd *UserProtocolHandler) Detail(c *gin.Context) {
|
|||||||
response.CheckAndRespWithData(c, res, err)
|
response.CheckAndRespWithData(c, res, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 用户协议新增
|
// @Summary 用户协议新增
|
||||||
// @Tags user_protocol-用户协议
|
// @Tags user_protocol-用户协议
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param Token header string true "token"
|
// @Param Token header string true "token"
|
||||||
// @Param Title body string false "标题"
|
// @Param Title body string false "标题"
|
||||||
// @Param Content body string false "协议内容"
|
// @Param Content body string false "协议内容"
|
||||||
// @Param Sort body number false "排序"
|
// @Param Sort body number false "排序"
|
||||||
// @Success 200 {object} response.Response "成功"
|
// @Success 200 {object} response.Response "成功"
|
||||||
// @Router /api/admin/user_protocol/add [post]
|
// @Router /api/admin/user_protocol/add [post]
|
||||||
func (hd *UserProtocolHandler) Add(c *gin.Context) {
|
func (hd *UserProtocolHandler) Add(c *gin.Context) {
|
||||||
var addReq UserProtocolAddReq
|
var addReq UserProtocolAddReq
|
||||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &addReq)) {
|
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &addReq)) {
|
||||||
@@ -106,16 +106,16 @@ func (hd *UserProtocolHandler) Add(c *gin.Context) {
|
|||||||
response.CheckAndRespWithData(c, createId, e)
|
response.CheckAndRespWithData(c, createId, e)
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 用户协议编辑
|
// @Summary 用户协议编辑
|
||||||
// @Tags user_protocol-用户协议
|
// @Tags user_protocol-用户协议
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param Token header string true "token"
|
// @Param Token header string true "token"
|
||||||
// @Param Id body number false ""
|
// @Param Id body number false "Id"
|
||||||
// @Param Title body string false "标题"
|
// @Param Title body string false "标题"
|
||||||
// @Param Content body string false "协议内容"
|
// @Param Content body string false "协议内容"
|
||||||
// @Param Sort body number false "排序"
|
// @Param Sort body number false "排序"
|
||||||
// @Success 200 {object} response.Response "成功"
|
// @Success 200 {object} response.Response "成功"
|
||||||
// @Router /api/admin/user_protocol/edit [post]
|
// @Router /api/admin/user_protocol/edit [post]
|
||||||
func (hd *UserProtocolHandler) Edit(c *gin.Context) {
|
func (hd *UserProtocolHandler) Edit(c *gin.Context) {
|
||||||
var editReq UserProtocolEditReq
|
var editReq UserProtocolEditReq
|
||||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &editReq)) {
|
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &editReq)) {
|
||||||
@@ -124,13 +124,13 @@ func (hd *UserProtocolHandler) Edit(c *gin.Context) {
|
|||||||
response.CheckAndRespWithData(c, editReq.Id, UserProtocolService.Edit(editReq))
|
response.CheckAndRespWithData(c, editReq.Id, UserProtocolService.Edit(editReq))
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 用户协议删除
|
// @Summary 用户协议删除
|
||||||
// @Tags user_protocol-用户协议
|
// @Tags user_protocol-用户协议
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param Token header string true "token"
|
// @Param Token header string true "token"
|
||||||
// @Param Id body number false ""
|
// @Param Id body number false "Id"
|
||||||
// @Success 200 {object} response.Response "成功"
|
// @Success 200 {object} response.Response "成功"
|
||||||
// @Router /api/admin/user_protocol/del [post]
|
// @Router /api/admin/user_protocol/del [post]
|
||||||
func (hd *UserProtocolHandler) Del(c *gin.Context) {
|
func (hd *UserProtocolHandler) Del(c *gin.Context) {
|
||||||
var delReq UserProtocolDelReq
|
var delReq UserProtocolDelReq
|
||||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &delReq)) {
|
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &delReq)) {
|
||||||
@@ -139,14 +139,14 @@ func (hd *UserProtocolHandler) Del(c *gin.Context) {
|
|||||||
response.CheckAndResp(c, UserProtocolService.Del(delReq.Id))
|
response.CheckAndResp(c, UserProtocolService.Del(delReq.Id))
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 用户协议删除-批量
|
// @Summary 用户协议删除-批量
|
||||||
// @Tags user_protocol-用户协议
|
// @Tags user_protocol-用户协议
|
||||||
//
|
//
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param Token header string true "token"
|
// @Param Token header string true "token"
|
||||||
// @Param Ids body string false "逗号分割的id"
|
// @Param Ids body string false "逗号分割的id"
|
||||||
// @Success 200 {object} response.Response "成功"
|
// @Success 200 {object} response.Response "成功"
|
||||||
// @Router /api/admin/user_protocol/delBatch [post]
|
// @Router /api/admin/user_protocol/delBatch [post]
|
||||||
func (hd *UserProtocolHandler) DelBatch(c *gin.Context) {
|
func (hd *UserProtocolHandler) DelBatch(c *gin.Context) {
|
||||||
var delReq UserProtocolDelBatchReq
|
var delReq UserProtocolDelBatchReq
|
||||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &delReq)) {
|
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &delReq)) {
|
||||||
@@ -161,18 +161,18 @@ func (hd *UserProtocolHandler) DelBatch(c *gin.Context) {
|
|||||||
response.CheckAndResp(c, UserProtocolService.DelBatch(Ids))
|
response.CheckAndResp(c, UserProtocolService.DelBatch(Ids))
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 用户协议导出
|
// @Summary 用户协议导出
|
||||||
// @Tags user_protocol-用户协议
|
// @Tags user_protocol-用户协议
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Param Token header string true "token"
|
// @Param Token header string true "token"
|
||||||
// @Param Title query string false "标题"
|
// @Param Title query string false "标题"
|
||||||
// @Param Content query string false "协议内容"
|
// @Param Content query string false "协议内容"
|
||||||
// @Param Sort query number false "排序"
|
// @Param Sort query number false "排序"
|
||||||
// @Param CreateTimeStart query string false "创建时间"
|
// @Param CreateTimeStart query string false "创建时间"
|
||||||
// @Param CreateTimeEnd query string false "创建时间"
|
// @Param CreateTimeEnd query string false "创建时间"
|
||||||
// @Param UpdateTimeStart query string false "更新时间"
|
// @Param UpdateTimeStart query string false "更新时间"
|
||||||
// @Param UpdateTimeEnd query string false "更新时间"
|
// @Param UpdateTimeEnd query string false "更新时间"
|
||||||
// @Router /api/admin/user_protocol/ExportFile [get]
|
// @Router /api/admin/user_protocol/ExportFile [get]
|
||||||
func (hd *UserProtocolHandler) ExportFile(c *gin.Context) {
|
func (hd *UserProtocolHandler) ExportFile(c *gin.Context) {
|
||||||
var listReq UserProtocolListReq
|
var listReq UserProtocolListReq
|
||||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &listReq)) {
|
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &listReq)) {
|
||||||
@@ -191,10 +191,10 @@ func (hd *UserProtocolHandler) ExportFile(c *gin.Context) {
|
|||||||
excel2.DownLoadExcel("用户协议"+time.Now().Format("20060102-150405"), c.Writer, f)
|
excel2.DownLoadExcel("用户协议"+time.Now().Format("20060102-150405"), c.Writer, f)
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Summary 用户协议导入
|
// @Summary 用户协议导入
|
||||||
// @Tags user_protocol-用户协议
|
// @Tags user_protocol-用户协议
|
||||||
// @Produce json
|
// @Produce json
|
||||||
// @Router /api/admin/user_protocol/ImportFile [post]
|
// @Router /api/admin/user_protocol/ImportFile [post]
|
||||||
func (hd *UserProtocolHandler) ImportFile(c *gin.Context) {
|
func (hd *UserProtocolHandler) ImportFile(c *gin.Context) {
|
||||||
file, _, err := c.Request.FormFile("file")
|
file, _, err := c.Request.FormFile("file")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
3883
server/docs/docs.go
3883
server/docs/docs.go
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user