ai_scheduler/internal/biz/do/macro_test.go

33 lines
1.3 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package do
import (
"ai_scheduler/internal/config"
"ai_scheduler/internal/data/impl"
"ai_scheduler/internal/data/model"
"ai_scheduler/utils"
"context"
"testing"
)
func Test_report(t *testing.T) {
con := "[利润同比报表]商品修改:官方–优酷周卡,官方–优酷月卡,官方–优酷季卡,官方–优酷年卡,,官方–爱奇艺-月卡,官方–爱奇艺-季卡,官方–爱奇艺-年卡,官方–芒果-PC周卡,官方–芒果-PC月卡,官方–芒果-PC季卡,官方QQ音乐-绿钻月卡,官方–饿了么超级会员月卡,官方网易云黑胶vip月卡,官方喜马拉雅巅峰会员月卡剪映会员7天卡剪映会员月卡剪映会员年卡剪映SVIP会员7天卡剪映SVIP会员月卡剪映SVIP会员年卡"
run()
chatId, err, i := ma.ProductModify(context.Background(), con, &model.AiBotGroupConfig{ConfigID: 1, ToolList: "8,9,10,11,12,13,16"})
t.Log(chatId, err, i)
}
var ma *Macro
func run() {
configConfig, _ := config.LoadConfigWithTest()
db, _ := utils.NewGormDb(configConfig)
rdb := utils.NewRdb(configConfig)
reportDailyCacheImpl := impl.NewReportDailyCacheImpl(db)
botGroupImpl := impl.NewBotGroupImpl(db)
botGroupConfigImpl := impl.NewBotGroupConfigImpl(db)
ma = NewMacro(botGroupImpl, reportDailyCacheImpl, configConfig, rdb, botGroupConfigImpl)
}