|
@@ -928,7 +928,7 @@ type IndustrialReadNum struct {
|
|
|
//获取该产业下文章的用户阅读次数-小红点用
|
|
|
func GetReportIndustrialReadNumList(userId int, industrialIds string) (items []*IndustrialReadNum, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
- sql := `SELECT a.industrial_management_id, SUM(a.readnum) AS readnum FROM (
|
|
|
+ sql := `SELECT a.industrial_management_id, MIN(a.readnum) AS readnum FROM (
|
|
|
SELECT man_g.industrial_management_id,( SELECT COUNT( 1 ) FROM cygx_article_history_record AS rec WHERE rec.user_id = ` + strconv.Itoa(userId) + ` AND rec.article_id = a.article_id ) AS readnum
|
|
|
FROM
|
|
|
cygx_article AS a
|