diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index d41403b09..7b8db4cee 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -1280,7 +1280,8 @@ func SendAlarmVendorSnapshot(ctx *jxcontext.Context, parentTask tasksch.ITask, p } } if len(mobileList) > 0 { - title := fmt.Sprintf("门店状态变化:%s-->%s", utils.Time2Str(prevSnapshotList[0].SnapshotAt), utils.Time2Str(curSnapshotList[0].SnapshotAt)) + const fixTitle = "门店状态变化" + title := fmt.Sprintf("%s:%s-->%s", fixTitle, utils.Time2Str(prevSnapshotList[0].SnapshotAt), utils.Time2Str(curSnapshotList[0].SnapshotAt)) task := tasksch.NewParallelTask("SendAlarmVendorSnapshot", tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { mobile := batchItemList[0].(string) @@ -1321,12 +1322,17 @@ func SendAlarmVendorSnapshot(ctx *jxcontext.Context, parentTask tasksch.ITask, p isFirstRow = false } excelConf := &excel.Obj2ExcelSheetConfig{ - Title: title, + Title: fixTitle, Data: dataList, CaptionList: captionList, } excelBin := excel.Obj2Excel([]*excel.Obj2ExcelSheetConfig{excelConf}) - key := "export/" + mobile + time.Now().Format("20060102T150405") + ".xlsx" + keyPart := []string{ + fixTitle, + mobile, + time.Now().Format("20060102T150405") + ".xlsx", + } + key := "export/" + strings.Join(keyPart, "_") excelURL, err2 := jxutils.UploadExportContent(excelBin, key) if err2 != nil { globals.SugarLogger.Warnf("SendAlarmVendorSnapshot, send %s failed with error:%v", key, err2)