diff --git a/cmd/main.go b/cmd/main.go index 05f3730..1aa5e0c 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -31,7 +31,7 @@ _/ ____\______ ____ _____ _____ ____ __ _ _______ ____ ____ log.Println("目前是定时任务模式") log.Printf("等待任务的第%v次执行...\n", operateTime) // 定义任务,每周五的五点执行 - gocron.Every(1).Saturday().At("16:00").Do(retryJob) + gocron.Every(1).Friday().At("16:00").Do(retryJob) // 开始定时任务 <-gocron.Start() } else { @@ -68,9 +68,11 @@ func job() error { return err } } - result := aichat.NewAiReq(excel.ExcelAddress).StartChat(option.MODEL_API).PrepareWechatBody() - remainder := fmt.Sprintf("文件同步完成,地址是%v,稍后将发送ai分析结果%v", excel.ExcelAddress, ">_<~") + + remainder := fmt.Sprintf("文件同步完成,地址是%v,稍后将发送ai分析结果%v", "http://43.143.245.135:233/"+excel.ExcelName, ">_<~") notifer.SendWechat(remainder) + + result := aichat.NewAiReq(excel.ExcelAddress).StartChat(option.MODEL_API).PrepareWechatBody() notifer.SendWechat(result) return nil } diff --git a/udesk/reply/method.go b/udesk/reply/method.go index 804c6bc..2b86f91 100644 --- a/udesk/reply/method.go +++ b/udesk/reply/method.go @@ -82,19 +82,22 @@ func (e *Excel) SetReplyContent() *Excel { repliesContentSlice := tools.ReverseSlice(s) repliesContentSlice = tools.RemoveNewlineElements(repliesContentSlice) repliesContentSlice = tools.AddNewlineToEachElement(repliesContentSlice) - //跳过没有回复内容的工单。 - if len(repliesContentSlice) == 0 { - return - } //工单id转换为cloudid cloudId := filter.Id2CloudId(v) if cloudId == "" { contentMap[v] = repliesContentSlice - log.Printf("goroutine%v:回复内容处理完成,工单id(非cloudid是%v)", j, v) + log.Printf("goroutine%v:回复内容处理完成,工单id(非cloudid是%v\n)", j, v) + log.Printf("goroutine%v:UdeskId为:%v,内容为:%v\n", j, v, contentMap[v]) } else { contentMap[cloudId] = repliesContentSlice - log.Printf("goroutine%v:回复内容处理完成,工单id(非cloudid是%v)", j, v) + log.Printf("goroutine%v:回复内容处理完成,工单id(cloudid是%v\n)", j, cloudId) + log.Printf("goroutine%v:cloudId为:%v,内容为:%v\n", j, cloudId, contentMap[cloudId]) + } + + //跳过没有回复内容的工单。 + if len(repliesContentSlice) == 0 { + return } log.Printf("goroutine%v结束\n", j)