|
@@ -4,10 +4,11 @@ import (
|
|
"errors"
|
|
"errors"
|
|
"eta/eta_api/utils"
|
|
"eta/eta_api/utils"
|
|
"fmt"
|
|
"fmt"
|
|
- "github.com/beego/beego/v2/client/orm"
|
|
|
|
- "github.com/rdlucklib/rdluck_tools/paging"
|
|
|
|
"strings"
|
|
"strings"
|
|
"time"
|
|
"time"
|
|
|
|
+
|
|
|
|
+ "github.com/beego/beego/v2/client/orm"
|
|
|
|
+ "github.com/rdlucklib/rdluck_tools/paging"
|
|
)
|
|
)
|
|
|
|
|
|
type EnglishReport struct {
|
|
type EnglishReport struct {
|
|
@@ -36,6 +37,7 @@ type EnglishReport struct {
|
|
ReportCode string `description:"报告唯一编码"`
|
|
ReportCode string `description:"报告唯一编码"`
|
|
Pv int `description:"Pv"`
|
|
Pv int `description:"Pv"`
|
|
PvEmail int `description:"邮箱PV"`
|
|
PvEmail int `description:"邮箱PV"`
|
|
|
|
+ UvEmail int `description:"邮箱UV"`
|
|
EmailState int `description:"群发邮件状态: 0-未发送; 1-已发送"`
|
|
EmailState int `description:"群发邮件状态: 0-未发送; 1-已发送"`
|
|
Overview string `description:"英文概述部分"`
|
|
Overview string `description:"英文概述部分"`
|
|
KeyTakeaways string `description:"关键点"`
|
|
KeyTakeaways string `description:"关键点"`
|
|
@@ -260,6 +262,7 @@ type EnglishReportList struct {
|
|
Pv int `description:"Pv"`
|
|
Pv int `description:"Pv"`
|
|
ShareUrl string `description:"分享url"`
|
|
ShareUrl string `description:"分享url"`
|
|
PvEmail int `description:"邮箱PV"`
|
|
PvEmail int `description:"邮箱PV"`
|
|
|
|
+ UvEmail int `description:"邮箱UV"`
|
|
EmailState int `description:"群发邮件状态: 0-未发送; 1-已发送"`
|
|
EmailState int `description:"群发邮件状态: 0-未发送; 1-已发送"`
|
|
EmailAuth bool `description:"是否有权限群发邮件"`
|
|
EmailAuth bool `description:"是否有权限群发邮件"`
|
|
EmailHasFail bool `description:"是否存在邮件发送失败的记录"`
|
|
EmailHasFail bool `description:"是否存在邮件发送失败的记录"`
|
|
@@ -964,6 +967,7 @@ func FormatEnglishReport2ListItem(origin *EnglishReport) (item *EnglishReportLis
|
|
item.ReportCode = origin.ReportCode
|
|
item.ReportCode = origin.ReportCode
|
|
item.Pv = origin.Pv
|
|
item.Pv = origin.Pv
|
|
item.PvEmail = origin.PvEmail
|
|
item.PvEmail = origin.PvEmail
|
|
|
|
+ item.UvEmail = origin.UvEmail
|
|
|
|
|
|
if item.PvEmail > 0 {
|
|
if item.PvEmail > 0 {
|
|
item.Pv = 0
|
|
item.Pv = 0
|
|
@@ -989,11 +993,10 @@ func UpdateEnglishReportEmailHasFail(reportId int) (err error) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
|
|
func UpdatePdfUrlEnglishReportById(reportId int) (err error) {
|
|
func UpdatePdfUrlEnglishReportById(reportId int) (err error) {
|
|
o := orm.NewOrmUsingDB("rddp")
|
|
o := orm.NewOrmUsingDB("rddp")
|
|
sql := `UPDATE english_report SET detail_img_url = '',detail_pdf_url='',modify_time=NOW() WHERE id = ? `
|
|
sql := `UPDATE english_report SET detail_img_url = '',detail_pdf_url='',modify_time=NOW() WHERE id = ? `
|
|
_, err = o.Raw(sql, reportId).Exec()
|
|
_, err = o.Raw(sql, reportId).Exec()
|
|
return
|
|
return
|
|
-}
|
|
+}
|