|
@@ -498,7 +498,7 @@ func (this *ReportController) List() {
|
|
|
}
|
|
|
|
|
|
for k, v := range list {
|
|
|
- if v.Readnum == 0 && user.CreatedTime.Before(utils.StrTimeToTime(v.PublishDate)) && utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrTimeToTime(v.PublishDate)) {
|
|
|
+ if v.Readnum == 0 && user.CreatedTime.Before(utils.StrDateToTime(v.PublishDate)) && utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrDateToTime(v.PublishDate)) {
|
|
|
list[k].IsRed = true
|
|
|
}
|
|
|
if v.VideoUrl != "" {
|
|
@@ -2537,7 +2537,7 @@ func (this *ReportController) SearchResource() {
|
|
|
conditionOr += ` OR ( m.subject_names LIKE '%` + keyWord + `%' AND a.article_id < ` + strconv.Itoa(utils.SummaryArticleId) + ` AND publish_status = 1 ) `
|
|
|
condition = ` AND m.industry_name LIKE '%` + keyWord + `%' AND a.article_id < ` + strconv.Itoa(utils.SummaryArticleId) + conditionOr
|
|
|
|
|
|
- listHz, err := models.GetSearchResourceList(condition, 0, 0)
|
|
|
+ listHz, err := models.GetSearchResourceList(user.UserId, condition, 0, 0)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取信息失败"
|
|
|
br.ErrMsg = "获取品种信息失败,Err:" + err.Error()
|
|
@@ -2547,7 +2547,7 @@ func (this *ReportController) SearchResource() {
|
|
|
conditionOr = ` OR ( m.subject_names LIKE '%` + keyWord + `%' AND a.article_id >= ` + strconv.Itoa(utils.SummaryArticleId) + ` AND publish_status = 1 ) `
|
|
|
condition = ` AND m.industry_name LIKE '%` + keyWord + `%' AND a.article_id >= ` + strconv.Itoa(utils.SummaryArticleId) + conditionOr
|
|
|
|
|
|
- listYx, err := models.GetSearchResourceList(condition, 0, 0)
|
|
|
+ listYx, err := models.GetSearchResourceList(user.UserId, condition, 0, 0)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取信息失败"
|
|
|
br.ErrMsg = "获取文章列表失败,Err:" + err.Error()
|
|
@@ -2708,7 +2708,7 @@ func (this *ReportController) SearchReportAndResource() {
|
|
|
conditionOr += ` OR ( m.subject_names LIKE '%` + keyWord + `%' AND a.article_id < ` + strconv.Itoa(utils.SummaryArticleId) + ` AND publish_status = 1 ) `
|
|
|
condition = ` AND m.industry_name LIKE '%` + keyWord + `%' AND a.article_id < ` + strconv.Itoa(utils.SummaryArticleId) + conditionOr
|
|
|
|
|
|
- listHzResource, err := models.GetSearchResourceList(condition, 0, pageSize)
|
|
|
+ listHzResource, err := models.GetSearchResourceList(user.UserId, condition, 0, pageSize)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取信息失败"
|
|
|
br.ErrMsg = "获取品种信息失败,Err:" + err.Error()
|
|
@@ -2718,7 +2718,7 @@ func (this *ReportController) SearchReportAndResource() {
|
|
|
conditionOr = ` OR ( m.subject_names LIKE '%` + keyWord + `%' AND a.article_id >= ` + strconv.Itoa(utils.SummaryArticleId) + ` AND publish_status = 1 ) `
|
|
|
condition = ` AND m.industry_name LIKE '%` + keyWord + `%' AND a.article_id >= ` + strconv.Itoa(utils.SummaryArticleId) + conditionOr
|
|
|
|
|
|
- listYxResource, err := models.GetSearchResourceList(condition, 0, pageSize)
|
|
|
+ listYxResource, err := models.GetSearchResourceList(user.UserId, condition, 0, pageSize)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取信息失败"
|
|
|
br.ErrMsg = "获取文章列表失败,Err:" + err.Error()
|
|
@@ -2767,6 +2767,9 @@ func (this *ReportController) SearchReportAndResource() {
|
|
|
if fllowMap[v.IndustrialManagementId] > 0 {
|
|
|
listHzResource[k].IsFollw = true
|
|
|
}
|
|
|
+ if v.Readnum == 0 && user.CreatedTime.Before(utils.StrDateToTime(v.PublishDate)) && utils.StrTimeToTime(utils.OnlineTime).Before(utils.StrDateToTime(v.PublishDate)) {
|
|
|
+ listHzResource[k].IsRed = true
|
|
|
+ }
|
|
|
industrialIdArr = append(industrialIdArr, v.IndustrialManagementId)
|
|
|
}
|
|
|
|
|
@@ -3186,7 +3189,7 @@ func (this *ReportController) ResearchSummaryVoiceHistoryAdd() {
|
|
|
return
|
|
|
}
|
|
|
item := models.CygxResearchSummaryVoiceHistory{
|
|
|
- ArticleId: articleId,
|
|
|
+ ArticleId: articleId,
|
|
|
UserId: uid,
|
|
|
CreateTime: time.Now(),
|
|
|
Mobile: user.Mobile,
|
|
@@ -3247,7 +3250,7 @@ func (this *ReportController) ResearchSummaryVoiceHistoryAdd() {
|
|
|
return
|
|
|
}
|
|
|
item := models.CygxMinutesSummaryVoiceHistory{
|
|
|
- ArticleId: articleId,
|
|
|
+ ArticleId: articleId,
|
|
|
UserId: uid,
|
|
|
CreateTime: time.Now(),
|
|
|
Mobile: user.Mobile,
|
|
@@ -3308,7 +3311,7 @@ func (this *ReportController) ResearchSummaryVoiceHistoryAdd() {
|
|
|
return
|
|
|
}
|
|
|
item := models.CygxReportSelectionVoiceHistory{
|
|
|
- ArticleId: articleId,
|
|
|
+ ArticleId: articleId,
|
|
|
UserId: uid,
|
|
|
CreateTime: time.Now(),
|
|
|
Mobile: user.Mobile,
|