|
@@ -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
|
|
|
}
|
|
|
|