数据引擎重构
This commit is contained in:
@@ -13,6 +13,26 @@ import (
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// ============================================================
|
||||
// 批量操作(供 PPGo_Job 调度)
|
||||
// ============================================================
|
||||
|
||||
type extractAllReq struct {
|
||||
g.Meta `path:"/extractAll" method:"post" tags:"报表引擎" summary:"全量抽取" dc:"遍历所有启用业务+报表,抽取前一天数据"`
|
||||
}
|
||||
|
||||
type extractAllRes struct {
|
||||
Success bool `json:"success"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
func (c *report) ExtractAll(ctx context.Context, req *extractAllReq) (*extractAllRes, error) {
|
||||
ctx = ctxWithUser(ctx)
|
||||
logrus.Info("[HTTP] 触发全量抽取")
|
||||
reportSvc.ExecDailyExtract(ctx)
|
||||
return &extractAllRes{Success: true, Message: "全量抽取已触发"}, nil
|
||||
}
|
||||
|
||||
type report struct{}
|
||||
|
||||
var ReportController = new(report)
|
||||
|
||||
Reference in New Issue
Block a user