瀏覽代碼

修改问号占位符

317699326@qq.com 3 月之前
父節點
當前提交
230a03dfae
共有 1 個文件被更改,包括 6 次插入5 次删除
  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 反转切片