package router import ( "ai_scheduler/internal/config" "ai_scheduler/internal/entitys" "ai_scheduler/internal/services/advice" "github.com/gofiber/fiber/v2" ) func AdvicerRouterRegist( cfg *config.Config, r fiber.Router, adviceFile *advice.FileService, adviceData *advice.AdvicerService, adviceChat *advice.ChatService, adviceProject *advice.ProjectService, adviceTalkSkill *advice.TalkSkillService, adviceClient *advice.ClientService, industry *advice.IndustryService, admin *advice.AdminService, modelSup *advice.ModelSupService, activity *advice.ActivityService, wxHook *advice.WxHookService, smart *advice.SmartService, wxProxy *advice.WxProxyService, adviceCustomer *advice.CustomerService, adviceLabel *advice.LabelService, ) { advicer := r.Group("advice/admin") // 登录放行 advicer.Post("login", Vali(admin.Login, &entitys.AdvicerAdminLoginReq{})) advicer.Post("add", Vali(admin.Add, &entitys.AdvicerAdminAddReq{})) advicer.Post("update", Vali(admin.Update, &entitys.AdvicerAdminUpdateReq{})) advicer.Post("list", Vali(admin.List, &entitys.AdvicerAdminListReq{})) advicer.Post("del", Vali(admin.Del, &entitys.AdvicerAdminDelReq{})) advicer.Post("file/word/ana", adviceFile.WordAna) advicer.Post("file/upload", adviceFile.Upload) //销售 advicer.Post("advicer/add", adviceData.AdvicerUpdate) advicer.Post("advicer/update", adviceData.AdvicerUpdate) advicer.Post("advicer/wx_device/update", adviceData.AdvicerWxDeviceIdUpdate) advicer.Post("advicer/wx_id/update", adviceData.AdvicerWxIdUpdate) advicer.Post("advicer/hosting/update", adviceData.HostingUpdate) advicer.Post("advicer/list", adviceData.AdvicerList) advicer.Post("advicer/info", adviceData.AdvicerInfo) advicer.Post("advicer/version/add", adviceData.AdvicerVersionAdd) advicer.Post("advicer/version/update", adviceData.AdvicerVersionUpdate) advicer.Post("advicer/version/del", adviceData.AdvicerVersionDel) advicer.Post("advicer/version/list", adviceData.AdvicerVersionList) advicer.Post("advicer/version/generate", adviceData.VersionStyleGenerate) //聊天技巧 advicer.Post("skill/list", adviceTalkSkill.TalkSkillList) advicer.Post("skill/add", adviceTalkSkill.TalkSkillAdd) advicer.Post("skill/update", adviceTalkSkill.TalkSkillUpdate) advicer.Post("skill/del", adviceTalkSkill.TalkSkillDel) advicer.Post("skill/generate", adviceTalkSkill.TalkSkillGenerate) //项目 advicer.Post("project/base/init", adviceProject.BaseInit) advicer.Post("project/base/update", adviceProject.BaseUpdate) advicer.Post("project/info/add", adviceProject.Add) advicer.Post("project/info/update", adviceProject.Update) advicer.Post("project/info", adviceProject.Info) advicer.Post("project/list", adviceProject.List) advicer.Post("project/template/copy", adviceProject.TemplateCopy) advicer.Post("project/data/load", adviceProject.ProjectDataLoad) advicer.Post("project/data/save", adviceProject.ProjectDataSave) advicer.Post("project/data/generate", adviceProject.ProjectDataGenerate) //客户 advicer.Post("client/add", adviceClient.Add) advicer.Post("client/update", adviceClient.Update) advicer.Post("client/list", adviceClient.List) advicer.Post("client/del", adviceClient.Del) advicer.Post("client/bind", adviceClient.Bind) // 客户绑定微信 wxid advicer.Post("client/evaluate", adviceClient.Evaluate) // 客户等级评估(熟客/意向/沉睡/非客户) //产品活动 advicer.Post("activity/add", activity.Add) advicer.Post("activity/update", activity.Update) advicer.Post("activity/list", activity.List) advicer.Post("activity/del", activity.Del) advicer.Post("activity/info", activity.Info) advicer.Post("activity/active", activity.ActiveList) //微信回调与消息流水 advicer.Post("wx/callback/set", wxHook.SetCallback) // 设置上游消息回调地址 advicer.Post("wx/callback/info", wxHook.CallbackInfo) // 获取建议的回调地址 advicer.Post("wxmsg/list", wxHook.MsgList) // 消息流水查询 advicer.Post("wx/conversation/list", wxHook.ConversationList) // 会话列表(聚合最新消息) advicer.Post("wx/conversation/msgs", wxHook.ConversationMsgs) // 会话消息记录 advicer.Post("wx/conversation/read", wxHook.MarkAsRead) // 标记会话消息已读 //智能策略(四级回复策略/主动对话/自我迭代) advicer.Post("smart/reply/test", smart.ReplyTest) // 策略干跑预览(send=true 实际发送) advicer.Post("smart/reply", smart.Reply) // 对客户最新消息手动执行策略回复 advicer.Post("smart/regular/scan", smart.RegularScan) // 熟客超时兜底扫描 advicer.Post("smart/iterate/run", smart.IterateRun) // 手动触发画像迭代 advicer.Post("smart/profile/regenerate", smart.ProfileRegenerate) // 画像更新(旧画像+聊天记录重新生成动态栏目) advicer.Post("smart/proactive/scan", smart.ProactiveScan) // 主动触达扫描(生日/活动) advicer.Post("smart/proactive/send", smart.ProactiveSend) // 手动推送给指定客户 advicer.Post("smart/activity/push", smart.ActivityPush) // 活动立即群推 advicer.Post("smart/proactive/log", smart.ProactiveLog) // 主动触达记录查询 // 时间约定(复盘抽取,两表分开存):定时提醒 + 成交线索 advicer.Post("smart/remind/list", smart.RemindList) // 定时提醒列表 advicer.Post("smart/remind/create", smart.RemindCreate) // 新增定时提醒 advicer.Post("smart/remind/cancel", smart.RemindCancel) // 取消定时提醒 advicer.Post("smart/lead/list", smart.LeadList) // 成交线索列表 advicer.Post("smart/lead/create", smart.LeadCreate) // 新增成交线索 advicer.Post("smart/lead/cancel", smart.LeadCancel) // 取消成交线索 advicer.Post("smart/lead/complete", smart.LeadComplete) // 成交线索标记完成 //会话 advicer.Post("chat/regis", adviceChat.Regis) advicer.Post("chat/chat", adviceChat.Chat) //行业 advicer.Post("industry/add", Vali(industry.Add, &entitys.AdvicerIndustryAddReq{})) advicer.Post("industry/update", Vali(industry.Update, &entitys.AdvicerIndustryUpdateReq{})) advicer.Post("industry/generate", Vali(industry.Generate, &entitys.AdvicerIndustryGenerateReq{})) advicer.Post("industry/list", Vali(industry.List, &entitys.AdvicerIndustryListReq{})) advicer.Post("industry/del", Vali(industry.Del, &entitys.AdvicerIndustryDelReq{})) //模型配置 advicer.Post("modelsup/add", modelSup.Add) advicer.Post("modelsup/update", modelSup.Update) advicer.Post("modelsup/list", modelSup.List) advicer.Post("modelsup/del", modelSup.Del) // 微信 API 代理(包装转发,标准响应格式) advicer.Post("wx/batch_chatroom_info", wxProxy.BatchChatroomInfo) advicer.All("wx/*", wxProxy.Proxy) // 微信好友(ai_advice_customer) advicer.Post("advicer/customer/add", adviceCustomer.Add) advicer.Post("advicer/customer/list", adviceCustomer.List) advicer.Post("advicer/customer/del", adviceCustomer.Del) advicer.Post("advicer/customer/diff", adviceCustomer.Diff) advicer.Post("advicer/customer/batch_add", adviceCustomer.BatchAdd) advicer.Post("advicer/customer/batch_update", adviceCustomer.BatchUpdate) advicer.Post("advicer/customer/update_labels", adviceCustomer.UpdateLabels) advicer.Post("advicer/customer/update_note", adviceCustomer.UpdateNote) advicer.Post("advicer/customer/remove_label", adviceCustomer.RemoveLabel) advicer.Post("advicer/customer/hosted", adviceCustomer.HostedList) // 微信标签(ai_advice_label) advicer.Post("advicer/label/list", adviceLabel.List) advicer.Post("advicer/label/sync", adviceLabel.Sync) advicer.Post("advicer/label/hosting", adviceLabel.ToggleHosting) }