|
@@ -870,4 +870,13 @@ func GetLocalIP() (ip string, err error) {
|
|
|
func GetRichText(content string) (contentSub string) {
|
|
|
contentSub = strings.Replace(content, "<p data-f-id=\"pbf\" style=\"text-align: center; font-size: 14px; margin-top: 30px; opacity: 0.65; font-family: sans-serif;\">Powered by <a href=\"https://www.froala.com/wysiwyg-editor?pb=1\" title=\"Froala Editor\">Froala Editor</a></p>", "", -1)
|
|
|
return
|
|
|
-}
|
|
|
+}
|
|
|
+
|
|
|
+// GetOrmInReplace 获取orm的in查询替换?的方法
|
|
|
+func GetOrmInReplace(num int) string {
|
|
|
+ template := make([]string, num)
|
|
|
+ for i := 0; i < num; i++ {
|
|
|
+ template[i] = "?"
|
|
|
+ }
|
|
|
+ return strings.Join(template, ",")
|
|
|
+}
|