|
@@ -327,7 +327,7 @@ func Report2pdfAndJpeg(reportUrl string, reportId, reportType int) {
|
|
|
reportCode := utils.MD5(strconv.Itoa(reportId))
|
|
|
|
|
|
// pc端
|
|
|
- {
|
|
|
+ go func() {
|
|
|
pdfPath := `./static/` + reportCode + "_1200.pdf"
|
|
|
jpegPath := `./static/` + reportCode + "_1200.jpg"
|
|
|
|
|
@@ -448,10 +448,10 @@ func Report2pdfAndJpeg(reportUrl string, reportId, reportType int) {
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }()
|
|
|
|
|
|
// 移动端
|
|
|
- {
|
|
|
+ go func() {
|
|
|
pdfPathMobile := `./static/` + reportCode + "_600.pdf"
|
|
|
jpegPathMobile := `./static/` + reportCode + "_600.jpg"
|
|
|
|
|
@@ -495,7 +495,7 @@ func Report2pdfAndJpeg(reportUrl string, reportId, reportType int) {
|
|
|
// 更新pdf url
|
|
|
ob := new(smart_report.SmartReport)
|
|
|
ob.SmartReportId = reportId
|
|
|
- ob.DetailPdfUrl = resourceUrl
|
|
|
+ ob.DetailPdfUrlMobile = resourceUrl
|
|
|
if err = ob.Update([]string{"DetailPdfUrlMobile"}); err != nil {
|
|
|
utils.FileLog.Info("更新研报失败, Err: \n" + err.Error())
|
|
|
return
|
|
@@ -551,7 +551,7 @@ func Report2pdfAndJpeg(reportUrl string, reportId, reportType int) {
|
|
|
// 更新jpeg url
|
|
|
ob := new(smart_report.SmartReport)
|
|
|
ob.SmartReportId = reportId
|
|
|
- ob.DetailImgUrl = resourceUrl
|
|
|
+ ob.DetailImgUrlMobile = resourceUrl
|
|
|
if err = ob.Update([]string{"DetailImgUrlMobile"}); err != nil {
|
|
|
utils.FileLog.Info("更新研报失败, Err: \n" + err.Error())
|
|
|
return
|
|
@@ -569,5 +569,5 @@ func Report2pdfAndJpeg(reportUrl string, reportId, reportType int) {
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }()
|
|
|
}
|