33 lines
1.3 KiB
Go
33 lines
1.3 KiB
Go
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)
|
||
}
|