瀏覽代碼

no message

xingzai 1 年之前
父節點
當前提交
291ffbfbb6
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      models/cygx/cygx_user.go

+ 2 - 2
models/cygx/cygx_user.go

@@ -353,8 +353,8 @@ type CygxChartResp struct {
 // 获取阅读记录数量
 func GetCygxArticleHistoryCount(mobile, email, condition string) (count int, err error) {
 	o := orm.NewOrm()
-	sqlCount := ` SELECT COUNT(1) AS count  FROM cygx_article_history_record_all as r  INNER JOIN cygx_article  as art  ON  art.article_id = r.article_id  WHERE   r.mobile  = ?  AND is_del = 0 ` + condition + `  OR ( email = ? AND email <> ''  AND is_del = 0  ` + condition + `) `
-	err = o.Raw(sqlCount, mobile, email).QueryRow(&count)
+	sqlCount := ` SELECT COUNT(1) AS count  FROM cygx_article_history_record_all as r  INNER JOIN cygx_article  as art  ON  art.article_id = r.article_id  WHERE   r.mobile  = '` + mobile + `'  AND is_del = 0 ` + condition
+	err = o.Raw(sqlCount).QueryRow(&count)
 	return
 }