Browse Source

合并冲突

kobe6258 2 weeks ago
parent
commit
628b87145e
1 changed files with 6 additions and 8 deletions
  1. 6 8
      models/report.go

+ 6 - 8
models/report.go

@@ -6,12 +6,10 @@ import (
 	"eta/eta_api/global"
 	"eta/eta_api/utils"
 	"fmt"
-	"github.com/beego/beego/v2/client/orm"
-	"strings"
-	"time"
-
 	"github.com/rdlucklib/rdluck_tools/paging"
 	"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) {
-	o := orm.NewOrmUsingDB("rddp")
+	o := global.DbMap[utils.DbNameReport]
 	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
 }
 
 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=? `
-	_, err = o.Raw(sql, detailImgUrlMobile, reportId).Exec()
+	err = o.Exec(sql, detailImgUrlMobile, reportId).Error
 	return
 }