作者 yangfu

点赞列表修改

@@ -84,7 +84,9 @@ func DeleteChanceFavorite(id int64) (err error) { @@ -84,7 +84,9 @@ func DeleteChanceFavorite(id int64) (err error) {
84 //获取用户点赞收藏机会 84 //获取用户点赞收藏机会
85 func GetChanceFavorites(userId, companyId int64, markFlag, sourceType int, sourceId int64, lastId int64, pageSize int) (v []*ChanceFavorite, total int, err error) { 85 func GetChanceFavorites(userId, companyId int64, markFlag, sourceType int, sourceId int64, lastId int64, pageSize int) (v []*ChanceFavorite, total int, err error) {
86 sql := mybeego.NewSqlExutor().Table("chance_favorite").Order("create_at desc") 86 sql := mybeego.NewSqlExutor().Table("chance_favorite").Order("create_at desc")
  87 + if userId > 0 {
87 sql.Where(fmt.Sprintf("user_id=%d", userId)) 88 sql.Where(fmt.Sprintf("user_id=%d", userId))
  89 + }
88 sql.Where(fmt.Sprintf("company_id=%d", companyId)) 90 sql.Where(fmt.Sprintf("company_id=%d", companyId))
89 if sourceType > 0 { 91 if sourceType > 0 {
90 sql.Where(fmt.Sprintf("source_type=%d", sourceType)) 92 sql.Where(fmt.Sprintf("source_type=%d", sourceType))