Преглед изворни кода

Merge branch 'cygx/cygx_14.2' of http://8.136.199.33:3000/hongze/hz_crm_api

zhangchuanxing пре 2 месеци
родитељ
комит
3ae9741817

+ 6 - 2
controllers/cygx/morning_meeting_review.go

@@ -256,6 +256,7 @@ func (this *MorningMeetingController) PreserveAndPublish() {
 		} else {
 			for _, item := range reqList.List {
 				go services.SendWxMsgWithCygxMorningMeeting(int(meetingId), item.IndustryId, item.IndustryName)
+				go cygxService.UpdateIndustrialManagementTimeLineDateList3ByRedis(item.IndustryId) //处理产业管理时间线相关内容的数据
 			}
 			//添加到首页最新
 			listchapter, err := cygx.GetCygxMorningMeetingReviewsListById(int(meetingId))
@@ -440,6 +441,7 @@ func (this *MorningMeetingController) PreserveAndPublish() {
 		} else {
 			for _, item := range reqList.List {
 				go services.SendWxMsgWithCygxMorningMeeting(reqList.MeetingId, item.IndustryId, item.IndustryName)
+				go cygxService.UpdateIndustrialManagementTimeLineDateList3ByRedis(item.IndustryId) //处理产业管理时间线相关内容的数据
 			}
 			for _, itemchapter := range listchapter {
 				//go cygxService.UpdateResourceData(itemchapter.Id, "meetingreviewchapt", "add", time.Now().Format(utils.FormatDateTime))
@@ -599,6 +601,7 @@ func (this *MorningMeetingController) PublishReport() {
 		for _, item := range list {
 			fmt.Println(item.Id)
 			go services.SendWxMsgWithCygxMorningMeeting(vint, item.IndustryId, item.IndustryName)
+			go cygxService.UpdateIndustrialManagementTimeLineDateList3ByRedis(item.IndustryId) //处理产业管理时间线相关内容的数据
 			//go cygxService.UpdateResourceData(item.Id, "meetingreviewchapt", "add", time.Now().Format(utils.FormatDateTime))
 			go cygxService.UpdateMeetingreviewchaptResourceData(item.Id) //写入首页最新  cygx_resource_data 表
 			go elastic.AddComprehensiveMeetingreviewchapt(item.Id)       //Es添加晨会精华
@@ -648,8 +651,9 @@ func (this *MorningMeetingController) PublishCancleReport() {
 	}
 	for _, item := range list {
 		//go cygxService.UpdateResourceData(item.Id, "meetingreviewchapt", "delete", time.Now().Format(utils.FormatDateTime))
-		go cygxService.UpdateMeetingreviewchaptResourceData(item.Id) //写入首页最新  cygx_resource_data 表
-		go elastic.DeleteComprehensiveMeetingreviewchapt(item.Id)    //Es删除晨会精华
+		go cygxService.UpdateMeetingreviewchaptResourceData(item.Id)                       //写入首页最新  cygx_resource_data 表
+		go elastic.DeleteComprehensiveMeetingreviewchapt(item.Id)                          //Es删除晨会精华
+		go cygxService.UpdateIndustrialManagementTimeLineDateList3ByRedis(item.IndustryId) //处理产业管理时间线相关内容的数据
 	}
 	var condition string
 	var pars []interface{}

+ 20 - 0
services/cygx/industrial_management.go

@@ -129,3 +129,23 @@ func AddUserIndustryFllowByNewId(industrialManagementId int) (err error) {
 	//}
 	return
 }
+
+// 处理产业管理时间线相关内容的数据
+func UpdateIndustrialManagementTimeLineDateList3ByRedis(industrialManagementId int) (err error) {
+	defer func() {
+		if err != nil {
+			fmt.Println(err)
+			msg := fmt.Sprint("industrialManagementId:", industrialManagementId)
+			go alarm_msg.SendAlarmMsg("处理产业管理时间线相关内容的数据,写入Redis队列消息失败: UpdateIndustrialManagementTimeLineDateList3ByRedis"+err.Error()+msg, 2)
+		}
+	}()
+	//SourceType int       `description:"1:报名、 2:取消报名、3:活动编辑、4:活动发布,取消发布、5:活动到会。"`
+	log := &cygx.IndustrialManagementDelte{IndustrialManagementId: industrialManagementId}
+	if utils.Re == nil {
+		err := utils.Rc.LPush(utils.CYGX_ARTICLE_TIME_LINE_KEY, log)
+		if err != nil {
+			fmt.Println("UpdateIndustrialManagementTimeLineDateList3ByRedis LPush Err:" + err.Error())
+		}
+	}
+	return
+}

+ 1 - 0
utils/constants.go

@@ -424,6 +424,7 @@ const (
 	CHART_PERMISSION_NAME_45W                      = "45w大套餐" // 权益45w大套餐名称
 	CHART_PERMISSION_ID_45W                        = 2002     // 权益45w大套餐表示的权限ID(自定义)
 	HONG_GUAN_NAME                          string = "宏观"
+	CYGX_ARTICLE_TIME_LINE_KEY                     = "CYGX_ARTICLE_TIME_LINE_KEY" //产业时间线关联的文章key
 )
 
 // 权益cygx_config配置主键以后放这里