Browse Source

no message

xingzai 1 year ago
parent
commit
823d8aa294
2 changed files with 2 additions and 2 deletions
  1. 1 1
      models/cygx/article_and_yanxuan_record.go
  2. 1 1
      services/cygx/article.go

+ 1 - 1
models/cygx/article_and_yanxuan_record.go

@@ -65,7 +65,7 @@ func GetCygxArticleAndYanxuanRecordRespList(condition string, pars []interface{}
 func GetCygxArticleAndYanxuanRecordRespListWeekly(condition string, pars []interface{}, startSize, pageSize int) (items []*CygxArticleAndYanxuanRecordResp, err error) {
 	o := orm.NewOrmUsingDB("hz_cygx")
 	databaseName := utils.GetWeeklyDatabase()
-	sql := `SELECT * FROM cygx_article_and_yanxuan_record as r 
+	sql := `SELECT r.* FROM cygx_article_and_yanxuan_record as r 
 			INNER JOIN %s.user_seller_relation AS us ON us.user_id = r.user_id   AND us.product_id = 2 
 		WHERE 1= 1   `
 	sql = fmt.Sprintf(sql, databaseName)

+ 1 - 1
services/cygx/article.go

@@ -221,7 +221,7 @@ func HandleArticleAndYanxuanRecordList(items []*cygx.CygxArticleAndYanxuanRecord
 		mapArticle := make(map[int]*cygx.CygxReportArticle)
 		lenarticleIds := len(articleIds)
 		if lenarticleIds > 0 {
-			condition = " AND art.article_id IN  (" + utils.GetOrmInReplace(lenarticleIds) + ")"
+			condition = " AND art.article_id IN  (" + utils.GetOrmInReplace(lenarticleIds) + ")  GROUP  BY art.article_id "
 			pars = append(pars, articleIds)
 			list, e := cygx.GetReportArticleList(condition, pars, 0, lenarticleIds, 1)
 			if e != nil && e.Error() != utils.ErrNoRow() {