|
@@ -6,12 +6,10 @@ import (
|
|
"eta/eta_api/global"
|
|
"eta/eta_api/global"
|
|
"eta/eta_api/utils"
|
|
"eta/eta_api/utils"
|
|
"fmt"
|
|
"fmt"
|
|
- "github.com/beego/beego/v2/client/orm"
|
|
|
|
- "strings"
|
|
|
|
- "time"
|
|
|
|
-
|
|
|
|
"github.com/rdlucklib/rdluck_tools/paging"
|
|
"github.com/rdlucklib/rdluck_tools/paging"
|
|
"gorm.io/gorm"
|
|
"gorm.io/gorm"
|
|
|
|
+ "strings"
|
|
|
|
+ "time"
|
|
)
|
|
)
|
|
|
|
|
|
// 报告状态
|
|
// 报告状态
|
|
@@ -1575,16 +1573,16 @@ func ModifyReportImgUrl(reportId int, detailImgUrl string) (err error) {
|
|
}
|
|
}
|
|
|
|
|
|
func ModifyReportPdfUrlMobile(reportId int, detailPdfUrlMobile string) (err error) {
|
|
func ModifyReportPdfUrlMobile(reportId int, detailPdfUrlMobile string) (err error) {
|
|
- o := orm.NewOrmUsingDB("rddp")
|
|
|
|
|
|
+ o := global.DbMap[utils.DbNameReport]
|
|
sql := `UPDATE report SET detail_pdf_url_mobile=? WHERE id=? `
|
|
sql := `UPDATE report SET detail_pdf_url_mobile=? WHERE id=? `
|
|
- _, err = o.Raw(sql, detailPdfUrlMobile, reportId).Exec()
|
|
|
|
|
|
+ err = o.Exec(sql, detailPdfUrlMobile, reportId).Error
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
func ModifyReportImgUrlMobile(reportId int, detailImgUrlMobile string) (err error) {
|
|
func ModifyReportImgUrlMobile(reportId int, detailImgUrlMobile string) (err error) {
|
|
- o := orm.NewOrmUsingDB("rddp")
|
|
|
|
|
|
+ o := global.DbMap[utils.DbNameReport]
|
|
sql := `UPDATE report SET detail_img_url_mobile=? WHERE id=? `
|
|
sql := `UPDATE report SET detail_img_url_mobile=? WHERE id=? `
|
|
- _, err = o.Raw(sql, detailImgUrlMobile, reportId).Exec()
|
|
|
|
|
|
+ err = o.Exec(sql, detailImgUrlMobile, reportId).Error
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|