Browse Source

修改问号占位符

317699326@qq.com 1 month ago
parent
commit
230a03dfae
1 changed files with 6 additions and 5 deletions
  1. 6 5
      utils/common.go

+ 6 - 5
utils/common.go

@@ -636,11 +636,12 @@ func StrTimeToTime(strTime string) time.Time {
 
 // GetOrmInReplace 获取orm的in查询替换?的方法
 func GetOrmInReplace(num int) string {
-	template := make([]string, num)
-	for i := 0; i < num; i++ {
-		template[i] = "?"
-	}
-	return strings.Join(template, ",")
+	//template := make([]string, num)
+	//for i := 0; i < num; i++ {
+	//	template[i] = "?"
+	//}
+	//return strings.Join(template, ",")
+	return "?"
 }
 
 // RevSlice 反转切片