根据excel创建标品终极优化2
This commit is contained in:
@@ -2058,7 +2058,7 @@ func CreateUpcSkuByExcelBin(ctx *jxcontext.Context, reader io.Reader) (hint stri
|
||||
createUpcSkuByExcelErrList = append(createUpcSkuByExcelErrList, v.(*CreateUpcSkuByExcelErr))
|
||||
}
|
||||
if len(createUpcSkuByExcelErrList) > 0 {
|
||||
err = writeToExcel(excelTitle, createUpcSkuByExcelErrList, task)
|
||||
err = writeToExcel(excelTitle, createUpcSkuByExcelErrList, ctx)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2070,7 +2070,7 @@ func CreateUpcSkuByExcelBin(ctx *jxcontext.Context, reader io.Reader) (hint stri
|
||||
return hint, err
|
||||
}
|
||||
|
||||
func writeToExcel(excelTitle []string, dataList interface{}, task *tasksch.SeqTask) (err error) {
|
||||
func writeToExcel(excelTitle []string, dataList interface{}, ctx *jxcontext.Context) (err error) {
|
||||
var sheetList []*excel.Obj2ExcelSheetConfig
|
||||
var downloadURL, fileName string
|
||||
excelConf := &excel.Obj2ExcelSheetConfig{
|
||||
@@ -2088,7 +2088,7 @@ func writeToExcel(excelTitle []string, dataList interface{}, task *tasksch.SeqTa
|
||||
baseapi.SugarLogger.Errorf("WriteToExcel:upload %s , %s failed error:%v", fileName, err)
|
||||
} else {
|
||||
noticeMsg := fmt.Sprintf("[详情点我]%s/billshow/?normal=true&path=%s \n", globals.BackstageHost, downloadURL)
|
||||
task.SetNoticeMsg(noticeMsg)
|
||||
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, ctx.GetUserID(), "异步任务完成", noticeMsg)
|
||||
baseapi.SugarLogger.Debug("WriteToExcel: dataSuccess downloadURL: [%v]", downloadURL)
|
||||
}
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user