|
@@ -26,7 +26,7 @@ import (
|
|
//roadshow
|
|
//roadshow
|
|
|
|
|
|
//func init() {
|
|
//func init() {
|
|
-// UpdateActivityResourceData(2703)
|
|
|
|
|
|
+// UpdateMicroRoadshowResourceData(7)
|
|
//}
|
|
//}
|
|
|
|
|
|
// 更新活动
|
|
// 更新活动
|
|
@@ -75,14 +75,43 @@ func UpdateActivityResourceData(sourceId int) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
var resourceDataId int
|
|
var resourceDataId int
|
|
- publishDate := time.Now().Format(utils.FormatDateTime)
|
|
|
|
|
|
+ publishDate := detail.CreateTime // 活动创建时间作为排序时间
|
|
|
|
+
|
|
item := new(cygx.CygxResourceData)
|
|
item := new(cygx.CygxResourceData)
|
|
|
|
+
|
|
|
|
+ var industrialName string
|
|
|
|
+ var subjectName string
|
|
|
|
+ //建立首页资源表,与产业的关系
|
|
|
|
+ industrialList, e := cygx.GetIndustrialActivityGroupManagementList(sourceId, 1)
|
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
+ err = errors.New("GetIndustrialActivityGroupManagementList, Err: " + e.Error() + "activityId:" + strconv.Itoa(sourceId))
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for _, v := range industrialList {
|
|
|
|
+ industrialName += v.IndustryName
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //建立首页资源表,与标的 的关系
|
|
|
|
+ subjectList, e := cygx.GetSubjectActivityGroupManagementList(sourceId, 1)
|
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
+ err = errors.New("GetIndustrialActivityGroupManagementList, Err: " + e.Error() + "activityId:" + strconv.Itoa(sourceId))
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for _, v := range subjectList {
|
|
|
|
+ subjectName += v.SubjectName
|
|
|
|
+ }
|
|
|
|
+
|
|
item.SourceId = sourceId
|
|
item.SourceId = sourceId
|
|
item.Source = source
|
|
item.Source = source
|
|
//分析师电话会(C类)
|
|
//分析师电话会(C类)
|
|
item.SearchTag = detail.ActivityTypeName
|
|
item.SearchTag = detail.ActivityTypeName
|
|
item.ChartPermissionId = detail.ChartPermissionId
|
|
item.ChartPermissionId = detail.ChartPermissionId
|
|
item.PublishDate = publishDate
|
|
item.PublishDate = publishDate
|
|
|
|
+ item.SearchTitle = detail.ActivityName
|
|
|
|
+ item.SearchContent = detail.Label + industrialName + subjectName
|
|
|
|
+ item.SearchOrderTime = detail.ActivityTime
|
|
item.CreateTime = time.Now()
|
|
item.CreateTime = time.Now()
|
|
if totalData == 0 {
|
|
if totalData == 0 {
|
|
newId, e := cygx.AddCygxResourceData(item)
|
|
newId, e := cygx.AddCygxResourceData(item)
|
|
@@ -105,12 +134,6 @@ func UpdateActivityResourceData(sourceId int) {
|
|
resourceDataId = sourceDetail.Id
|
|
resourceDataId = sourceDetail.Id
|
|
}
|
|
}
|
|
|
|
|
|
- //建立首页资源表,与产业的关系
|
|
|
|
- industrialList, e := cygx.GetIndustrialActivityGroupManagementList(sourceId, 1)
|
|
|
|
- if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
- err = errors.New("GetIndustrialActivityGroupManagementList, Err: " + e.Error() + "activityId:" + strconv.Itoa(sourceId))
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
var industrialItems []*cygx.CygxResourceDataIndustrialGroupManagement
|
|
var industrialItems []*cygx.CygxResourceDataIndustrialGroupManagement
|
|
for _, v := range industrialList {
|
|
for _, v := range industrialList {
|
|
var industrialItem = new(cygx.CygxResourceDataIndustrialGroupManagement)
|
|
var industrialItem = new(cygx.CygxResourceDataIndustrialGroupManagement)
|
|
@@ -123,11 +146,6 @@ func UpdateActivityResourceData(sourceId int) {
|
|
}
|
|
}
|
|
|
|
|
|
//建立首页资源表,与标的 的关系
|
|
//建立首页资源表,与标的 的关系
|
|
- subjectList, e := cygx.GetSubjectActivityGroupManagementList(sourceId, 1)
|
|
|
|
- if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
- err = errors.New("GetIndustrialActivityGroupManagementList, Err: " + e.Error() + "activityId:" + strconv.Itoa(sourceId))
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
var subjectItems []*cygx.CygxResourceDataIndustrialGroupSubject
|
|
var subjectItems []*cygx.CygxResourceDataIndustrialGroupSubject
|
|
for _, v := range subjectList {
|
|
for _, v := range subjectList {
|
|
var subjectItem = new(cygx.CygxResourceDataIndustrialGroupSubject)
|
|
var subjectItem = new(cygx.CygxResourceDataIndustrialGroupSubject)
|
|
@@ -194,7 +212,7 @@ func UpdateActivitySpecialResourceData(sourceId int) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
var resourceDataId int
|
|
var resourceDataId int
|
|
- publishDate := time.Now().Format(utils.FormatDateTime)
|
|
|
|
|
|
+ publishDate := activityInfo.PublishDate
|
|
item := new(cygx.CygxResourceData)
|
|
item := new(cygx.CygxResourceData)
|
|
item.SourceId = sourceId
|
|
item.SourceId = sourceId
|
|
item.Source = source
|
|
item.Source = source
|
|
@@ -203,6 +221,15 @@ func UpdateActivitySpecialResourceData(sourceId int) {
|
|
item.PublishDate = publishDate
|
|
item.PublishDate = publishDate
|
|
item.ChartPermissionId = activityInfo.ChartPermissionId
|
|
item.ChartPermissionId = activityInfo.ChartPermissionId
|
|
item.CreateTime = time.Now()
|
|
item.CreateTime = time.Now()
|
|
|
|
+ item.SearchTitle = activityInfo.ResearchTheme
|
|
|
|
+ item.SearchContent = activityInfo.Label + activityInfo.IndustrialName + activityInfo.IndustrialSubjectName
|
|
|
|
+
|
|
|
|
+ if activityInfo.Days > 0 {
|
|
|
|
+ item.SearchOrderTime = activityInfo.ActivityTime
|
|
|
|
+ } else {
|
|
|
|
+ item.SearchOrderTime = activityInfo.PublishDate
|
|
|
|
+ }
|
|
|
|
+
|
|
if totalData == 0 {
|
|
if totalData == 0 {
|
|
newId, e := cygx.AddCygxResourceData(item)
|
|
newId, e := cygx.AddCygxResourceData(item)
|
|
if e != nil {
|
|
if e != nil {
|
|
@@ -313,6 +340,7 @@ func UpdateArticleResourceData(sourceId int) {
|
|
}
|
|
}
|
|
|
|
|
|
var resourceDataId int
|
|
var resourceDataId int
|
|
|
|
+ //publishDate := detail.CreateDate
|
|
publishDate := time.Now().Format(utils.FormatDateTime)
|
|
publishDate := time.Now().Format(utils.FormatDateTime)
|
|
item := new(cygx.CygxResourceData)
|
|
item := new(cygx.CygxResourceData)
|
|
if detail.ArticleTypeId > 0 {
|
|
if detail.ArticleTypeId > 0 {
|
|
@@ -327,10 +355,47 @@ func UpdateArticleResourceData(sourceId int) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ var industrialName string
|
|
|
|
+ var subjectName string
|
|
|
|
+ //建立首页资源表,与产业的关系
|
|
|
|
+ industrialList, e := cygx.GetIndustrialArticleGroupManagementList(sourceId)
|
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
+ err = errors.New("GetIndustrialArticleGroupManagementList, Err: " + e.Error() + "sourceId:" + strconv.Itoa(sourceId))
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for _, v := range industrialList {
|
|
|
|
+ industrialName += v.IndustryName
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //建立首页资源表,与标的 的关系
|
|
|
|
+ subjectList, e := cygx.GetSubjectArticleGroupManagementList(sourceId)
|
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
+ err = errors.New("GetSubjectArticleGroupManagementList, Err: " + e.Error() + "sourceId:" + strconv.Itoa(sourceId))
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for _, v := range subjectList {
|
|
|
|
+ subjectName += v.SubjectName
|
|
|
|
+ }
|
|
|
|
+
|
|
item.SourceId = sourceId
|
|
item.SourceId = sourceId
|
|
item.Source = source
|
|
item.Source = source
|
|
item.PublishDate = publishDate
|
|
item.PublishDate = publishDate
|
|
item.CreateTime = time.Now()
|
|
item.CreateTime = time.Now()
|
|
|
|
+ item.SearchTitle = detail.Title
|
|
|
|
+ annotation, e := utils.GetHtmlContentText(detail.Annotation)
|
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
+ err = errors.New("GetHtmlContentText, Err: " + e.Error() + "sourceId:" + strconv.Itoa(sourceId))
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ abstract, e := utils.GetHtmlContentText(detail.Abstract)
|
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
+ err = errors.New("GetHtmlContentText, Err: " + e.Error() + "sourceId:" + strconv.Itoa(sourceId))
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ item.SearchContent = annotation + abstract + detail.FieldName + detail.Stock + industrialName + subjectName
|
|
|
|
+ item.SearchOrderTime = detail.PublishDate
|
|
if totalData == 0 {
|
|
if totalData == 0 {
|
|
newId, e := cygx.AddCygxResourceData(item)
|
|
newId, e := cygx.AddCygxResourceData(item)
|
|
if e != nil {
|
|
if e != nil {
|
|
@@ -341,23 +406,17 @@ func UpdateArticleResourceData(sourceId int) {
|
|
} else {
|
|
} else {
|
|
e = cygx.UpdateResourceDataByItem(item)
|
|
e = cygx.UpdateResourceDataByItem(item)
|
|
if e != nil {
|
|
if e != nil {
|
|
- err = errors.New("UpdateResourceData, Err: " + e.Error())
|
|
|
|
|
|
+ err = errors.New("UpdateResourceDataByItem, Err: " + e.Error())
|
|
return
|
|
return
|
|
}
|
|
}
|
|
sourceDetail, e := cygx.GetCygxResourceDataByIdAndSource(sourceId, source)
|
|
sourceDetail, e := cygx.GetCygxResourceDataByIdAndSource(sourceId, source)
|
|
if e != nil {
|
|
if e != nil {
|
|
- err = errors.New("UpdateResourceData, Err: " + e.Error())
|
|
|
|
|
|
+ err = errors.New("GetCygxResourceDataByIdAndSource, Err: " + e.Error())
|
|
return
|
|
return
|
|
}
|
|
}
|
|
resourceDataId = sourceDetail.Id
|
|
resourceDataId = sourceDetail.Id
|
|
}
|
|
}
|
|
|
|
|
|
- //建立首页资源表,与产业的关系
|
|
|
|
- industrialList, e := cygx.GetIndustrialArticleGroupManagementList(sourceId)
|
|
|
|
- if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
- err = errors.New("GetIndustrialArticleGroupManagementList, Err: " + e.Error() + "sourceId:" + strconv.Itoa(sourceId))
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
var industrialItems []*cygx.CygxResourceDataIndustrialGroupManagement
|
|
var industrialItems []*cygx.CygxResourceDataIndustrialGroupManagement
|
|
for _, v := range industrialList {
|
|
for _, v := range industrialList {
|
|
var industrialItem = new(cygx.CygxResourceDataIndustrialGroupManagement)
|
|
var industrialItem = new(cygx.CygxResourceDataIndustrialGroupManagement)
|
|
@@ -367,14 +426,9 @@ func UpdateArticleResourceData(sourceId int) {
|
|
industrialItem.ResourceDataId = resourceDataId
|
|
industrialItem.ResourceDataId = resourceDataId
|
|
industrialItem.CreateTime = time.Now()
|
|
industrialItem.CreateTime = time.Now()
|
|
industrialItems = append(industrialItems, industrialItem)
|
|
industrialItems = append(industrialItems, industrialItem)
|
|
|
|
+ industrialName += v.IndustryName
|
|
}
|
|
}
|
|
|
|
|
|
- //建立首页资源表,与标的 的关系
|
|
|
|
- subjectList, e := cygx.GetSubjectArticleGroupManagementList(sourceId)
|
|
|
|
- if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
- err = errors.New("GetSubjectArticleGroupManagementList, Err: " + e.Error() + "sourceId:" + strconv.Itoa(sourceId))
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
var subjectItems []*cygx.CygxResourceDataIndustrialGroupSubject
|
|
var subjectItems []*cygx.CygxResourceDataIndustrialGroupSubject
|
|
for _, v := range subjectList {
|
|
for _, v := range subjectList {
|
|
var subjectItem = new(cygx.CygxResourceDataIndustrialGroupSubject)
|
|
var subjectItem = new(cygx.CygxResourceDataIndustrialGroupSubject)
|
|
@@ -384,6 +438,7 @@ func UpdateArticleResourceData(sourceId int) {
|
|
subjectItem.ResourceDataId = resourceDataId
|
|
subjectItem.ResourceDataId = resourceDataId
|
|
subjectItem.CreateTime = time.Now()
|
|
subjectItem.CreateTime = time.Now()
|
|
subjectItems = append(subjectItems, subjectItem)
|
|
subjectItems = append(subjectItems, subjectItem)
|
|
|
|
+ subjectName += v.SubjectName
|
|
}
|
|
}
|
|
|
|
|
|
//插入关联信息
|
|
//插入关联信息
|
|
@@ -443,14 +498,42 @@ func UpdateProductInteriorResourceData(sourceId int) {
|
|
}
|
|
}
|
|
mapMatchTypeName := GetCygxReportMappingCygxListMap() //报告匹配类型
|
|
mapMatchTypeName := GetCygxReportMappingCygxListMap() //报告匹配类型
|
|
var resourceDataId int
|
|
var resourceDataId int
|
|
- publishDate := time.Now().Format(utils.FormatDateTime)
|
|
|
|
|
|
+ publishDate := detail.CreateTime
|
|
item := new(cygx.CygxResourceData)
|
|
item := new(cygx.CygxResourceData)
|
|
|
|
+
|
|
|
|
+ var industrialName string
|
|
|
|
+ var subjectName string
|
|
|
|
+ //建立首页资源表,与产业的关系
|
|
|
|
+ industrialList, e := cygx.GetProductInteriorIndustrialGroupManagementList(sourceId)
|
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
+ err = errors.New("GetIndustrialArticleGroupManagementList, Err: " + e.Error() + "sourceId:" + strconv.Itoa(sourceId))
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for _, v := range industrialList {
|
|
|
|
+ industrialName += v.IndustryName
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //建立首页资源表,与标的 的关系
|
|
|
|
+ subjectList, e := cygx.GetProductInteriorIndustrialGroupSubjecttList(sourceId)
|
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
+ err = errors.New("GetSubjectArticleGroupManagementList, Err: " + e.Error() + "sourceId:" + strconv.Itoa(sourceId))
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for _, v := range subjectList {
|
|
|
|
+ subjectName += v.SubjectName
|
|
|
|
+ }
|
|
|
|
+
|
|
item.SourceId = sourceId
|
|
item.SourceId = sourceId
|
|
item.Source = source
|
|
item.Source = source
|
|
item.SearchTag = mapMatchTypeName[detail.MatchTypeId]
|
|
item.SearchTag = mapMatchTypeName[detail.MatchTypeId]
|
|
item.PublishDate = publishDate
|
|
item.PublishDate = publishDate
|
|
item.ChartPermissionId = detail.ChartPermissionId
|
|
item.ChartPermissionId = detail.ChartPermissionId
|
|
item.CreateTime = time.Now()
|
|
item.CreateTime = time.Now()
|
|
|
|
+ item.SearchTitle = detail.Title
|
|
|
|
+ item.SearchContent = detail.Abstract + industrialName + subjectName
|
|
|
|
+ item.SearchOrderTime = detail.PublishTime
|
|
if totalData == 0 {
|
|
if totalData == 0 {
|
|
newId, e := cygx.AddCygxResourceData(item)
|
|
newId, e := cygx.AddCygxResourceData(item)
|
|
if e != nil {
|
|
if e != nil {
|
|
@@ -472,12 +555,6 @@ func UpdateProductInteriorResourceData(sourceId int) {
|
|
resourceDataId = sourceDetail.Id
|
|
resourceDataId = sourceDetail.Id
|
|
}
|
|
}
|
|
|
|
|
|
- //建立首页资源表,与产业的关系
|
|
|
|
- industrialList, e := cygx.GetProductInteriorIndustrialGroupManagementList(sourceId)
|
|
|
|
- if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
- err = errors.New("GetIndustrialArticleGroupManagementList, Err: " + e.Error() + "sourceId:" + strconv.Itoa(sourceId))
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
var industrialItems []*cygx.CygxResourceDataIndustrialGroupManagement
|
|
var industrialItems []*cygx.CygxResourceDataIndustrialGroupManagement
|
|
for _, v := range industrialList {
|
|
for _, v := range industrialList {
|
|
var industrialItem = new(cygx.CygxResourceDataIndustrialGroupManagement)
|
|
var industrialItem = new(cygx.CygxResourceDataIndustrialGroupManagement)
|
|
@@ -489,12 +566,6 @@ func UpdateProductInteriorResourceData(sourceId int) {
|
|
industrialItems = append(industrialItems, industrialItem)
|
|
industrialItems = append(industrialItems, industrialItem)
|
|
}
|
|
}
|
|
|
|
|
|
- //建立首页资源表,与标的 的关系
|
|
|
|
- subjectList, e := cygx.GetProductInteriorIndustrialGroupSubjecttList(sourceId)
|
|
|
|
- if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
- err = errors.New("GetSubjectArticleGroupManagementList, Err: " + e.Error() + "sourceId:" + strconv.Itoa(sourceId))
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
var subjectItems []*cygx.CygxResourceDataIndustrialGroupSubject
|
|
var subjectItems []*cygx.CygxResourceDataIndustrialGroupSubject
|
|
for _, v := range subjectList {
|
|
for _, v := range subjectList {
|
|
var subjectItem = new(cygx.CygxResourceDataIndustrialGroupSubject)
|
|
var subjectItem = new(cygx.CygxResourceDataIndustrialGroupSubject)
|
|
@@ -516,7 +587,7 @@ func UpdateProductInteriorResourceData(sourceId int) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
-// 更新晨会精华
|
|
|
|
|
|
+// 更新晨会精华 (跟踪点评)
|
|
func UpdateMeetingreviewchaptResourceData(sourceId int) {
|
|
func UpdateMeetingreviewchaptResourceData(sourceId int) {
|
|
var err error
|
|
var err error
|
|
defer func() {
|
|
defer func() {
|
|
@@ -560,12 +631,54 @@ func UpdateMeetingreviewchaptResourceData(sourceId int) {
|
|
var resourceDataId int
|
|
var resourceDataId int
|
|
publishDate := time.Now().Format(utils.FormatDateTime)
|
|
publishDate := time.Now().Format(utils.FormatDateTime)
|
|
item := new(cygx.CygxResourceData)
|
|
item := new(cygx.CygxResourceData)
|
|
|
|
+
|
|
|
|
+ var industrialName string
|
|
|
|
+ var subjectName string
|
|
|
|
+ //建立首页资源表,与产业的关系
|
|
|
|
+ var condition string
|
|
|
|
+ var pars []interface{}
|
|
|
|
+ condition = " AND industrial_management_id = ? "
|
|
|
|
+ pars = append(pars, detail.IndustryId)
|
|
|
|
+ //建立首页资源表,与产业的关系
|
|
|
|
+ industrialList, e := cygx.GetTopOneMonthArtReadNumIndustryAll(condition, pars)
|
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
+ err = errors.New("GetTopOneMonthArtReadNumIndustryAll, Err: " + e.Error() + "sourceId:" + strconv.Itoa(sourceId))
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for _, v := range industrialList {
|
|
|
|
+ industrialName += v.IndustryName
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if detail.IndustrialSubjectIds != "" {
|
|
|
|
+ condition = ""
|
|
|
|
+ pars = make([]interface{}, 0)
|
|
|
|
+ condition = " AND industrial_subject_id IN (" + detail.IndustrialSubjectIds + ") "
|
|
|
|
+ //建立首页资源表,与标的 的关系
|
|
|
|
+ subjectList, e := cygx.GetCygxIndustrialSubjectListCondition(condition, pars)
|
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
+ err = errors.New("GetCygxIndustrialSubjectListCondition, Err: " + e.Error() + "sourceId:" + strconv.Itoa(sourceId))
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ for _, v := range subjectList {
|
|
|
|
+ subjectName += v.SubjectName
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
item.SourceId = sourceId
|
|
item.SourceId = sourceId
|
|
item.Source = source
|
|
item.Source = source
|
|
item.SearchTag = "晨会精华"
|
|
item.SearchTag = "晨会精华"
|
|
item.PublishDate = publishDate
|
|
item.PublishDate = publishDate
|
|
item.ChartPermissionId = detail.ChartPermissionId
|
|
item.ChartPermissionId = detail.ChartPermissionId
|
|
item.CreateTime = time.Now()
|
|
item.CreateTime = time.Now()
|
|
|
|
+ item.SearchTitle = industrialName + subjectName
|
|
|
|
+ content, e := utils.GetHtmlContentText(detail.Content)
|
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
+ err = errors.New("GetHtmlContentText, Err: " + e.Error() + "sourceId:" + strconv.Itoa(sourceId))
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ item.SearchContent = content
|
|
|
|
+ item.SearchOrderTime = detail.MeetingTime.Format(utils.FormatDateTime)
|
|
if totalData == 0 {
|
|
if totalData == 0 {
|
|
newId, e := cygx.AddCygxResourceData(item)
|
|
newId, e := cygx.AddCygxResourceData(item)
|
|
if e != nil {
|
|
if e != nil {
|
|
@@ -586,16 +699,7 @@ func UpdateMeetingreviewchaptResourceData(sourceId int) {
|
|
}
|
|
}
|
|
resourceDataId = sourceDetail.Id
|
|
resourceDataId = sourceDetail.Id
|
|
}
|
|
}
|
|
- var condition string
|
|
|
|
- var pars []interface{}
|
|
|
|
- condition = " AND industrial_management_id = ? "
|
|
|
|
- pars = append(pars, detail.IndustryId)
|
|
|
|
- //建立首页资源表,与产业的关系
|
|
|
|
- industrialList, e := cygx.GetTopOneMonthArtReadNumIndustryAll(condition, pars)
|
|
|
|
- if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
- err = errors.New("GetTopOneMonthArtReadNumIndustryAll, Err: " + e.Error() + "sourceId:" + strconv.Itoa(sourceId))
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
var industrialItems []*cygx.CygxResourceDataIndustrialGroupManagement
|
|
var industrialItems []*cygx.CygxResourceDataIndustrialGroupManagement
|
|
for _, v := range industrialList {
|
|
for _, v := range industrialList {
|
|
var industrialItem = new(cygx.CygxResourceDataIndustrialGroupManagement)
|
|
var industrialItem = new(cygx.CygxResourceDataIndustrialGroupManagement)
|
|
@@ -686,6 +790,9 @@ func UpdateReportSelectionResourceData(sourceId int) {
|
|
item.SearchTag = "重点公司"
|
|
item.SearchTag = "重点公司"
|
|
item.PublishDate = publishDate
|
|
item.PublishDate = publishDate
|
|
item.CreateTime = time.Now()
|
|
item.CreateTime = time.Now()
|
|
|
|
+ item.SearchTitle = detail.Title
|
|
|
|
+ item.SearchContent = ""
|
|
|
|
+ item.SearchOrderTime = detail.PublishDate
|
|
if totalData == 0 {
|
|
if totalData == 0 {
|
|
_, e := cygx.AddCygxResourceData(item)
|
|
_, e := cygx.AddCygxResourceData(item)
|
|
if e != nil {
|
|
if e != nil {
|
|
@@ -736,6 +843,11 @@ func UpdateResearchSummaryResourceData(sourceId int) {
|
|
err = errors.New("GetCygxReportSelectionBySourceAndId, Err: " + e.Error())
|
|
err = errors.New("GetCygxReportSelectionBySourceAndId, Err: " + e.Error())
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ detail, e := cygx.GetCygxResearchSummaryInfoById(sourceId)
|
|
|
|
+ if e != nil {
|
|
|
|
+ err = errors.New("GetCygxResearchSummaryInfoById, Err: " + e.Error())
|
|
|
|
+ return
|
|
|
|
+ }
|
|
publishDate := time.Now().Format(utils.FormatDateTime)
|
|
publishDate := time.Now().Format(utils.FormatDateTime)
|
|
item := new(cygx.CygxResourceData)
|
|
item := new(cygx.CygxResourceData)
|
|
item.SourceId = sourceId
|
|
item.SourceId = sourceId
|
|
@@ -743,6 +855,9 @@ func UpdateResearchSummaryResourceData(sourceId int) {
|
|
item.SearchTag = "本周研究汇总"
|
|
item.SearchTag = "本周研究汇总"
|
|
item.PublishDate = publishDate
|
|
item.PublishDate = publishDate
|
|
item.CreateTime = time.Now()
|
|
item.CreateTime = time.Now()
|
|
|
|
+ item.SearchTitle = detail.Title
|
|
|
|
+ item.SearchContent = ""
|
|
|
|
+ item.SearchOrderTime = detail.PublishDate
|
|
if totalData == 0 {
|
|
if totalData == 0 {
|
|
_, e := cygx.AddCygxResourceData(item)
|
|
_, e := cygx.AddCygxResourceData(item)
|
|
if e != nil {
|
|
if e != nil {
|
|
@@ -793,6 +908,12 @@ func UpdateMinutesSummaryResourceData(sourceId int) {
|
|
err = errors.New("GetCygxReportSelectionBySourceAndId, Err: " + e.Error())
|
|
err = errors.New("GetCygxReportSelectionBySourceAndId, Err: " + e.Error())
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ detail, e := cygx.GetCygxMinutesSummaryInfoById(sourceId)
|
|
|
|
+
|
|
|
|
+ if e != nil {
|
|
|
|
+ err = errors.New("GetCygxMinutesSummaryInfoById, Err: " + e.Error())
|
|
|
|
+ return
|
|
|
|
+ }
|
|
publishDate := time.Now().Format(utils.FormatDateTime)
|
|
publishDate := time.Now().Format(utils.FormatDateTime)
|
|
item := new(cygx.CygxResourceData)
|
|
item := new(cygx.CygxResourceData)
|
|
item.SourceId = sourceId
|
|
item.SourceId = sourceId
|
|
@@ -800,6 +921,9 @@ func UpdateMinutesSummaryResourceData(sourceId int) {
|
|
item.SearchTag = "上周纪要汇总"
|
|
item.SearchTag = "上周纪要汇总"
|
|
item.PublishDate = publishDate
|
|
item.PublishDate = publishDate
|
|
item.CreateTime = time.Now()
|
|
item.CreateTime = time.Now()
|
|
|
|
+ item.SearchTitle = detail.Title
|
|
|
|
+ item.SearchContent = ""
|
|
|
|
+ item.SearchOrderTime = detail.PublishDate
|
|
if totalData == 0 {
|
|
if totalData == 0 {
|
|
_, e := cygx.AddCygxResourceData(item)
|
|
_, e := cygx.AddCygxResourceData(item)
|
|
if e != nil {
|
|
if e != nil {
|
|
@@ -867,6 +991,31 @@ func UpdateActivityVoiceResourceData(sourceId int) {
|
|
}
|
|
}
|
|
publishDate := time.Now().Format(utils.FormatDateTime)
|
|
publishDate := time.Now().Format(utils.FormatDateTime)
|
|
item := new(cygx.CygxResourceData)
|
|
item := new(cygx.CygxResourceData)
|
|
|
|
+
|
|
|
|
+ var industrialName string
|
|
|
|
+ var subjectName string
|
|
|
|
+ //建立首页资源表,与产业的关系
|
|
|
|
+ industrialList, e := cygx.GetIndustrialActivityGroupManagementList(activityId, 1)
|
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
+ err = errors.New("GetIndustrialActivityGroupManagementList, Err: " + e.Error() + "activityId:" + strconv.Itoa(activityId))
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for _, v := range industrialList {
|
|
|
|
+ industrialName += v.IndustryName
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //建立首页资源表,与标的 的关系
|
|
|
|
+ subjectList, e := cygx.GetSubjectActivityGroupManagementList(activityId, 1)
|
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
+ err = errors.New("GetIndustrialActivityGroupManagementList, Err: " + e.Error() + "activityId:" + strconv.Itoa(activityId))
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for _, v := range subjectList {
|
|
|
|
+ subjectName += v.SubjectName
|
|
|
|
+ }
|
|
|
|
+
|
|
item.SourceId = sourceId
|
|
item.SourceId = sourceId
|
|
item.Source = source
|
|
item.Source = source
|
|
//易董办会的分析师电话会,为路演回放
|
|
//易董办会的分析师电话会,为路演回放
|
|
@@ -878,6 +1027,9 @@ func UpdateActivityVoiceResourceData(sourceId int) {
|
|
item.PublishDate = publishDate
|
|
item.PublishDate = publishDate
|
|
item.ChartPermissionId = activityInfo.ChartPermissionId
|
|
item.ChartPermissionId = activityInfo.ChartPermissionId
|
|
item.CreateTime = utils.StrDateToDate(activityInfo.ActivityTime)
|
|
item.CreateTime = utils.StrDateToDate(activityInfo.ActivityTime)
|
|
|
|
+ item.SearchTitle = voiceDetail.VoiceName
|
|
|
|
+ item.SearchContent = activityInfo.Label + industrialName + subjectName
|
|
|
|
+ item.SearchOrderTime = activityInfo.ActivityTime
|
|
if totalData == 0 {
|
|
if totalData == 0 {
|
|
_, e := cygx.AddCygxResourceData(item)
|
|
_, e := cygx.AddCygxResourceData(item)
|
|
if e != nil {
|
|
if e != nil {
|
|
@@ -943,6 +1095,29 @@ func UpdateActivityVideoResourceData(sourceId int) {
|
|
}
|
|
}
|
|
publishDate := time.Now().Format(utils.FormatDateTime)
|
|
publishDate := time.Now().Format(utils.FormatDateTime)
|
|
item := new(cygx.CygxResourceData)
|
|
item := new(cygx.CygxResourceData)
|
|
|
|
+ var industrialName string
|
|
|
|
+ var subjectName string
|
|
|
|
+ //建立首页资源表,与产业的关系
|
|
|
|
+ industrialList, e := cygx.GetIndustrialActivityGroupManagementList(activityId, 1)
|
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
+ err = errors.New("GetIndustrialActivityGroupManagementList, Err: " + e.Error() + "activityId:" + strconv.Itoa(activityId))
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for _, v := range industrialList {
|
|
|
|
+ industrialName += v.IndustryName
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //建立首页资源表,与标的 的关系
|
|
|
|
+ subjectList, e := cygx.GetSubjectActivityGroupManagementList(activityId, 1)
|
|
|
|
+ if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
|
+ err = errors.New("GetIndustrialActivityGroupManagementList, Err: " + e.Error() + "activityId:" + strconv.Itoa(activityId))
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ for _, v := range subjectList {
|
|
|
|
+ subjectName += v.SubjectName
|
|
|
|
+ }
|
|
item.SourceId = sourceId
|
|
item.SourceId = sourceId
|
|
item.Source = source
|
|
item.Source = source
|
|
//易董办会的分析师电话会,为路演回放
|
|
//易董办会的分析师电话会,为路演回放
|
|
@@ -955,6 +1130,9 @@ func UpdateActivityVideoResourceData(sourceId int) {
|
|
item.PublishDate = publishDate
|
|
item.PublishDate = publishDate
|
|
item.ChartPermissionId = activityInfo.ChartPermissionId
|
|
item.ChartPermissionId = activityInfo.ChartPermissionId
|
|
item.CreateTime = utils.StrDateToDate(activityInfo.ActivityTime)
|
|
item.CreateTime = utils.StrDateToDate(activityInfo.ActivityTime)
|
|
|
|
+ item.SearchTitle = videoDetail.VideoName
|
|
|
|
+ item.SearchContent = activityInfo.Label + industrialName + subjectName
|
|
|
|
+ item.SearchOrderTime = activityInfo.ActivityTime
|
|
if totalData == 0 {
|
|
if totalData == 0 {
|
|
_, e := cygx.AddCygxResourceData(item)
|
|
_, e := cygx.AddCygxResourceData(item)
|
|
if e != nil {
|
|
if e != nil {
|
|
@@ -1018,6 +1196,9 @@ func UpdateMicroRoadshowResourceData(sourceId int) {
|
|
item.PublishDate = publishDate
|
|
item.PublishDate = publishDate
|
|
item.ChartPermissionId = detail.ChartPermissionId
|
|
item.ChartPermissionId = detail.ChartPermissionId
|
|
item.CreateTime = time.Now()
|
|
item.CreateTime = time.Now()
|
|
|
|
+ item.SearchTitle = detail.VideoName
|
|
|
|
+ item.SearchContent = detail.IndustryName
|
|
|
|
+ item.SearchOrderTime = detail.PublishDate.Format(utils.FormatDateTime)
|
|
if totalData == 0 {
|
|
if totalData == 0 {
|
|
_, e := cygx.AddCygxResourceData(item)
|
|
_, e := cygx.AddCygxResourceData(item)
|
|
if e != nil {
|
|
if e != nil {
|
|
@@ -1086,6 +1267,9 @@ func UpdateAskserieVideoResourceData(sourceId int) {
|
|
item.PublishDate = publishDate
|
|
item.PublishDate = publishDate
|
|
item.ChartPermissionId = detail.ChartPermissionId
|
|
item.ChartPermissionId = detail.ChartPermissionId
|
|
item.CreateTime = time.Now()
|
|
item.CreateTime = time.Now()
|
|
|
|
+ item.SearchTitle = detail.VideoName
|
|
|
|
+ item.SearchContent = detail.IndustryName
|
|
|
|
+ item.SearchOrderTime = detail.PublishDate
|
|
if totalData == 0 {
|
|
if totalData == 0 {
|
|
_, e := cygx.AddCygxResourceData(item)
|
|
_, e := cygx.AddCygxResourceData(item)
|
|
if e != nil {
|
|
if e != nil {
|
|
@@ -1103,19 +1287,29 @@ func UpdateAskserieVideoResourceData(sourceId int) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
-func init23() {
|
|
|
|
|
|
+func init300() {
|
|
//var condition string
|
|
//var condition string
|
|
//var pars []interface{}
|
|
//var pars []interface{}
|
|
//
|
|
//
|
|
|
|
+
|
|
//{
|
|
//{
|
|
// //活动
|
|
// //活动
|
|
- // list, err := cygx.GetCygxResourceDataListBysource(utils.CYGX_OBJ_ACTIVITY)
|
|
|
|
|
|
+ // var condition string
|
|
|
|
+ // var pars []interface{}
|
|
|
|
+ // condition = " AND publish_status = 1 AND activity_id NOT IN (SELECT source_id FROM cygx_resource_data WHERE source = 'activity') "
|
|
|
|
+ // list, err := cygx.GetActivityListAll(condition, pars, 0, 9999)
|
|
// if err != nil {
|
|
// if err != nil {
|
|
// fmt.Println(err)
|
|
// fmt.Println(err)
|
|
// }
|
|
// }
|
|
|
|
+ //
|
|
|
|
+ // //list, err := cygx.GetCygxResourceDataListBysource(utils.CYGX_OBJ_ACTIVITY)
|
|
|
|
+ // //if err != nil {
|
|
|
|
+ // // fmt.Println(err)
|
|
|
|
+ // //}
|
|
|
|
+ // fmt.Println(len(list))
|
|
// for _, v := range list {
|
|
// for _, v := range list {
|
|
- // fmt.Println(v.Source)
|
|
|
|
- // UpdateActivityResourceData(v.SourceId)
|
|
|
|
|
|
+ // fmt.Println(v.ActivityId)
|
|
|
|
+ // UpdateActivityResourceData(v.ActivityId)
|
|
// }
|
|
// }
|
|
//}
|
|
//}
|
|
|
|
|
|
@@ -1161,14 +1355,25 @@ func init23() {
|
|
//}
|
|
//}
|
|
|
|
|
|
//{
|
|
//{
|
|
- // //文章
|
|
|
|
- // list, err := cygx.GetCygxResourceDataListBysource(utils.CYGX_OBJ_ARTICLE)
|
|
|
|
|
|
+ // var condition string
|
|
|
|
+ // var pars []interface{}
|
|
|
|
+ // condition = " AND publish_status = 1 AND article_id NOT IN (SELECT source_id FROM cygx_resource_data WHERE source = 'article') "
|
|
|
|
+ //
|
|
|
|
+ // list, err := cygx.GetArticleRoadshowEssenceList(condition, pars, 0, 9999)
|
|
// if err != nil {
|
|
// if err != nil {
|
|
// fmt.Println(err)
|
|
// fmt.Println(err)
|
|
|
|
+ // return
|
|
// }
|
|
// }
|
|
|
|
+ // fmt.Println(len(list))
|
|
|
|
+ // //return
|
|
|
|
+ // //文章
|
|
|
|
+ // //list, err := cygx.GetCygxResourceDataListBysource(utils.CYGX_OBJ_ARTICLE)
|
|
|
|
+ // //if err != nil {
|
|
|
|
+ // // fmt.Println(err)
|
|
|
|
+ // //}
|
|
// for _, v := range list {
|
|
// for _, v := range list {
|
|
- // fmt.Println(v.Source)
|
|
|
|
- // UpdateArticleResourceData(v.SourceId)
|
|
|
|
|
|
+ // fmt.Println(v.ArticleId)
|
|
|
|
+ // UpdateArticleResourceData(v.ArticleId)
|
|
// }
|
|
// }
|
|
//}
|
|
//}
|
|
|
|
|
|
@@ -1296,7 +1501,7 @@ func init23() {
|
|
// fmt.Println(err)
|
|
// fmt.Println(err)
|
|
// }
|
|
// }
|
|
// for _, v := range list {
|
|
// for _, v := range list {
|
|
- // fmt.Println(v.Source)
|
|
|
|
|
|
+ // fmt.Println(v.SourceId)
|
|
// UpdateActivityVideoResourceData(v.SourceId)
|
|
// UpdateActivityVideoResourceData(v.SourceId)
|
|
// }
|
|
// }
|
|
//}
|
|
//}
|
|
@@ -1313,4 +1518,40 @@ func init23() {
|
|
// }
|
|
// }
|
|
//}
|
|
//}
|
|
|
|
|
|
|
|
+ //{
|
|
|
|
+ // //问答系列视频
|
|
|
|
+ // list, err := cygx.GetCygxResourceDataListBysource(utils.CYGX_OBJ_ASKSERIEVIDEO)
|
|
|
|
+ // if err != nil {
|
|
|
|
+ // fmt.Println(err)
|
|
|
|
+ // }
|
|
|
|
+ // for _, v := range list {
|
|
|
|
+ // fmt.Println(v.SourceId)
|
|
|
|
+ // UpdateAskserieVideoResourceData(v.SourceId)
|
|
|
|
+ // }
|
|
|
|
+ //}
|
|
|
|
+
|
|
|
|
+ //{
|
|
|
|
+ // //晨会精华
|
|
|
|
+ // list, err := cygx.GetCygxResourceDataListBysource(utils.CYGX_OBJ_MEETINGREVIEWCHAPT)
|
|
|
|
+ // if err != nil {
|
|
|
|
+ // fmt.Println(err)
|
|
|
|
+ // }
|
|
|
|
+ // for _, v := range list {
|
|
|
|
+ // fmt.Println(v.SourceId)
|
|
|
|
+ // UpdateMeetingreviewchaptResourceData(v.SourceId)
|
|
|
|
+ // }
|
|
|
|
+ //}
|
|
|
|
+
|
|
|
|
+ //{
|
|
|
|
+ // //研选专栏
|
|
|
|
+ // list, err := cygx.GetCygxResourceDataListBysource(utils.CYGX_OBJ_YANXUANSPECIAL)
|
|
|
|
+ // if err != nil {
|
|
|
|
+ // fmt.Println(err)
|
|
|
|
+ // }
|
|
|
|
+ // for _, v := range list {
|
|
|
|
+ // fmt.Println(v.SourceId)
|
|
|
|
+ // UpdateYanxuanSpecialResourceData(v.SourceId)
|
|
|
|
+ // }
|
|
|
|
+ //}
|
|
|
|
+
|
|
}
|
|
}
|