|
@@ -421,17 +421,18 @@ func UpdateProductInteriorResourceData(sourceId int) {
|
|
|
err = errors.New("GetCygxReportSelectionBySourceAndId, Err: " + e.Error())
|
|
|
return
|
|
|
}
|
|
|
- //detail, e := cygx.GetCygxProductInteriorDetail(sourceId)
|
|
|
- //if e != nil {
|
|
|
- // err = errors.New("GetCygxReportSelectionInfoById, Err: " + err.Error())
|
|
|
- // return
|
|
|
- //}
|
|
|
+ detail, e := cygx.GetCygxProductInteriorDetail(sourceId)
|
|
|
+ if e != nil {
|
|
|
+ err = errors.New("GetCygxReportSelectionInfoById, Err: " + err.Error())
|
|
|
+ return
|
|
|
+ }
|
|
|
+ mapMatchTypeName := GetCygxReportMappingCygxListMap() //报告匹配类型
|
|
|
var resourceDataId int
|
|
|
publishDate := time.Now().Format(utils.FormatDateTime)
|
|
|
item := new(cygx.CygxResourceData)
|
|
|
item.SourceId = sourceId
|
|
|
item.Source = source
|
|
|
- item.SearchTag = "产品内测"
|
|
|
+ item.SearchTag = mapMatchTypeName[detail.MatchTypeId]
|
|
|
item.PublishDate = publishDate
|
|
|
item.CreateTime = time.Now()
|
|
|
if totalData == 0 {
|
|
@@ -735,7 +736,7 @@ func UpdateMinutesSummaryResourceData(sourceId int) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-func init21232() {
|
|
|
+func init1() {
|
|
|
var condition string
|
|
|
var pars []interface{}
|
|
|
//
|
|
@@ -763,33 +764,33 @@ func init21232() {
|
|
|
// }
|
|
|
//}
|
|
|
|
|
|
- {
|
|
|
- //文章
|
|
|
- list, err := cygx.GetArticlList(condition, pars, 0, 9999999)
|
|
|
- if err != nil {
|
|
|
- fmt.Println(err)
|
|
|
- }
|
|
|
- for _, v := range list {
|
|
|
- fmt.Println(v.ArticleId)
|
|
|
- UpdateArticleResourceData(v.ArticleId)
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
//{
|
|
|
- // //产品内测
|
|
|
- // list, err := cygx.GetCygxProductInteriorList(condition, pars, 0, 9999999)
|
|
|
+ // //文章
|
|
|
+ // list, err := cygx.GetArticlList(condition, pars, 0, 9999999)
|
|
|
// if err != nil {
|
|
|
// fmt.Println(err)
|
|
|
// }
|
|
|
// for _, v := range list {
|
|
|
- // fmt.Println(v.ProductInteriorId)
|
|
|
- // UpdateProductInteriorResourceData(v.ProductInteriorId)
|
|
|
+ // fmt.Println(v.ArticleId)
|
|
|
+ // UpdateArticleResourceData(v.ArticleId)
|
|
|
// }
|
|
|
//}
|
|
|
+
|
|
|
+ {
|
|
|
+ //产品内测
|
|
|
+ list, err := cygx.GetCygxProductInteriorList(condition, pars, 0, 9999999)
|
|
|
+ if err != nil {
|
|
|
+ fmt.Println(err)
|
|
|
+ }
|
|
|
+ for _, v := range list {
|
|
|
+ fmt.Println(v.ProductInteriorId)
|
|
|
+ UpdateProductInteriorResourceData(v.ProductInteriorId)
|
|
|
+ }
|
|
|
+ }
|
|
|
//
|
|
|
//{
|
|
|
// //晨会精华
|
|
|
- // list, err := cygx.GetCygxMorningMeetingGatherList(condition, pars, 0, 9999999)
|
|
|
+ // list, err := cygx.GetCygxMorningMeetingReviewChapterList(condition, pars, 0, 9999999)
|
|
|
// if err != nil {
|
|
|
// fmt.Println(err)
|
|
|
// }
|