mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-10-16 15:03:43 +08:00
模块化定时任务,方便在插件中注册任务;增加日志分组
This commit is contained in:
@@ -18,6 +18,8 @@ type cConsole struct{}
|
||||
func (c *cConsole) Stat(_ context.Context, _ *common.ConsoleStatReq) (res *common.ConsoleStatRes, err error) {
|
||||
res = new(common.ConsoleStatRes)
|
||||
|
||||
// 此处均为模拟数据,可以根据实际业务情况替换成真实数据
|
||||
|
||||
res.Visits.DayVisits = 12010
|
||||
res.Visits.Rise = 13501
|
||||
res.Visits.Decline = 10502
|
||||
|
@@ -24,7 +24,6 @@ func (c *cUpload) UploadImage(ctx context.Context, _ *common.UploadImageReq) (re
|
||||
err = gerror.New("没有找到上传的文件")
|
||||
return
|
||||
}
|
||||
|
||||
return service.CommonUpload().UploadImage(ctx, file)
|
||||
}
|
||||
|
||||
@@ -35,6 +34,5 @@ func (c *cUpload) UploadFile(ctx context.Context, _ *common.UploadFileReq) (res
|
||||
err = gerror.New("没有找到上传的文件")
|
||||
return
|
||||
}
|
||||
|
||||
return service.CommonUpload().UploadFile(ctx, file)
|
||||
}
|
||||
|
Reference in New Issue
Block a user