xyxie 2 月之前
父节点
当前提交
f047000d45
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      utils/common.go

+ 5 - 1
utils/common.go

@@ -12,7 +12,6 @@ import (
 	"encoding/json"
 	"errors"
 	"fmt"
-	"gorm.io/gorm"
 	"html"
 	"image"
 	"image/png"
@@ -32,6 +31,8 @@ import (
 	"time"
 	"unicode"
 
+	"gorm.io/gorm"
+
 	"github.com/PuerkitoBio/goquery"
 	"github.com/microcosm-cc/bluemonday"
 	"github.com/shopspring/decimal"
@@ -1410,6 +1411,9 @@ func GetReportContentTextSub(content string) (contentSub string, err error) {
 
 // GetOrmInReplace 获取orm的in查询替换?的方法
 func GetOrmInReplace(num int) string {
+	if DbDriverName == DbDriverByDm {
+		return "?"
+	}
 	template := make([]string, num)
 	for i := 0; i < num; i++ {
 		template[i] = "?"