|
@@ -1084,143 +1084,6 @@ func HandleArticleListByApi(artcleId int) (err error) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //类型ID 医药(医享会:28 、药调研:301)、消费【渠道新声:32】、科技【科技前言:79】、智造【匠心智造:84】或者是纪要做消息模板推送
|
|
|
- fmt.Println(v.CategoryId)
|
|
|
- //if v.IsSummary == 1 || (v.CategoryId == 28 || v.CategoryId == 301 || v.CategoryId == 32 || v.CategoryId == 79 || v.CategoryId == 84) {
|
|
|
- // sliceSubjects := strings.Split(v.Stock, "/")
|
|
|
- // fmt.Println(sliceSubjects)
|
|
|
- // if len(sliceSubjects) > 0 {
|
|
|
- // var subjectStr string
|
|
|
- // for _, vSubject := range sliceSubjects {
|
|
|
- // sliceKuohao := strings.Split(vSubject, "(") //过滤括号
|
|
|
- // sliceXiahuaxian := strings.Split(sliceKuohao[0], "-") //过滤下划线
|
|
|
- // subject := sliceXiahuaxian[0]
|
|
|
- // subjectStr += "'" + subject + "',"
|
|
|
- // }
|
|
|
- // if subjectStr != "" {
|
|
|
- // subjectStr = strings.TrimRight(subjectStr, ",")
|
|
|
- // activityIdList, err := models.GetActivityIdListBySubjecName(subjectStr)
|
|
|
- // if err != nil {
|
|
|
- // fmt.Println("GetActivityIdListBySubjecName Err:", err.Error())
|
|
|
- // return err
|
|
|
- // }
|
|
|
- // if len(activityIdList) > 0 {
|
|
|
- // var activityIdStr string
|
|
|
- // for _, vAct := range activityIdList {
|
|
|
- // activityIdStr += strconv.Itoa(vAct.ActivityId) + ","
|
|
|
- // }
|
|
|
- // activityIdStr = strings.TrimRight(activityIdStr, ",")
|
|
|
- // if activityIdStr != "" {
|
|
|
- // appointmentList, err := models.GetAppointmentListByActivityId(activityIdStr, "1,2,5")
|
|
|
- // if err != nil {
|
|
|
- // fmt.Println("GetAppointmentListByActivityId Err:", err.Error())
|
|
|
- // return err
|
|
|
- // }
|
|
|
- // if len(appointmentList) > 0 {
|
|
|
- // for _, vApp := range appointmentList {
|
|
|
- //
|
|
|
- // appointmentByMobileList, err := models.GetAppointmentListByActivityIdAndMobile(activityIdStr, vApp.Mobile)
|
|
|
- // if err != nil {
|
|
|
- // fmt.Println("GetAppointmentListByActivityId Err:", err.Error())
|
|
|
- // return err
|
|
|
- // }
|
|
|
- // var appointmentActivityName string
|
|
|
- // if len(appointmentByMobileList) > 0 {
|
|
|
- // for _, vAppM := range appointmentByMobileList {
|
|
|
- // appointmentActivityName += vAppM.ActivityName + ","
|
|
|
- // }
|
|
|
- // }
|
|
|
- // appointmentActivityName = strings.TrimRight(appointmentActivityName, ",")
|
|
|
- // if vApp.ActivityTypeId == 5 && v.CategoryId != 301 {
|
|
|
- // continue
|
|
|
- // }
|
|
|
- //
|
|
|
- // if vApp.Mobile != "" {
|
|
|
- // openIdListByAppointment, err := models.GetUserRecordListByMobile(4, vApp.Mobile)
|
|
|
- // if err != nil {
|
|
|
- // fmt.Println(err)
|
|
|
- // return err
|
|
|
- // }
|
|
|
- // keyword1 := "您预约的调研,有关联的纪要发布/更新了"
|
|
|
- // keyword2 := appointmentActivityName
|
|
|
- // keyword3 := v.Title
|
|
|
- // keyword4 := v.PublishDate.Format(utils.FormatDateTime)
|
|
|
- // SendWxMsgWithArticleClassToAdmin(keyword1, keyword2, keyword3, keyword4, openIdListByAppointment, artcleId)
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- //}
|
|
|
- //
|
|
|
- ////【公司调研】系列纪要发布/更新后
|
|
|
- //if v.CategoryId == 45 || v.CategoryId == 74 || v.CategoryId == 86 || v.CategoryId == 88 {
|
|
|
- // fmt.Println("处理预约纪要")
|
|
|
- // sliceSubjects := strings.Split(v.Stock, "/")
|
|
|
- // if len(sliceSubjects) > 0 {
|
|
|
- // var subjectStr string
|
|
|
- // for _, vSubject := range sliceSubjects {
|
|
|
- // sliceKuohao := strings.Split(vSubject, "(") //过滤括号
|
|
|
- // sliceXiahuaxian := strings.Split(sliceKuohao[0], "-") //过滤下划线
|
|
|
- // subject := sliceXiahuaxian[0]
|
|
|
- // subjectStr += "'" + subject + "',"
|
|
|
- // }
|
|
|
- // if subjectStr != "" {
|
|
|
- // subjectStr = strings.TrimRight(subjectStr, ",")
|
|
|
- // activityIdList, err := models.GetActivityIdListBySubjecName(subjectStr)
|
|
|
- // if err != nil {
|
|
|
- // fmt.Println("GetActivityIdListBySubjecName Err:", err.Error())
|
|
|
- // return err
|
|
|
- // }
|
|
|
- // if len(activityIdList) > 0 {
|
|
|
- // var activityIdStr string
|
|
|
- // for _, vAct := range activityIdList {
|
|
|
- // activityIdStr += strconv.Itoa(vAct.ActivityId) + ","
|
|
|
- // }
|
|
|
- // activityIdStr = strings.TrimRight(activityIdStr, ",")
|
|
|
- // if activityIdStr != "" {
|
|
|
- // appointmentList, err := models.GetAppointmentListByActivityId(activityIdStr, "3,4")
|
|
|
- // if err != nil {
|
|
|
- // fmt.Println("GetAppointmentListByActivityId Err:", err.Error())
|
|
|
- // return err
|
|
|
- // }
|
|
|
- // if len(appointmentList) > 0 {
|
|
|
- // for _, vApp := range appointmentList {
|
|
|
- // appointmentByMobileList, err := models.GetAppointmentListByActivityIdAndMobile(activityIdStr, vApp.Mobile)
|
|
|
- // if err != nil {
|
|
|
- // fmt.Println("GetAppointmentListByActivityId Err:", err.Error())
|
|
|
- // return err
|
|
|
- // }
|
|
|
- // var appointmentActivityName string
|
|
|
- // if len(appointmentByMobileList) > 0 {
|
|
|
- // for _, vAppM := range appointmentByMobileList {
|
|
|
- // appointmentActivityName += vAppM.ActivityName + ","
|
|
|
- // }
|
|
|
- // }
|
|
|
- // appointmentActivityName = strings.TrimRight(appointmentActivityName, ",")
|
|
|
- // if vApp.Mobile != "" {
|
|
|
- // openIdListByAppointment, err := models.GetUserRecordListByMobile(4, vApp.Mobile)
|
|
|
- // if err != nil {
|
|
|
- // fmt.Println(err)
|
|
|
- // return err
|
|
|
- // }
|
|
|
- // keyword1 := "您预约的调研,有关联的纪要发布/更新了"
|
|
|
- // keyword2 := appointmentActivityName
|
|
|
- // keyword3 := v.Title
|
|
|
- // keyword4 := v.PublishDate.Format(utils.FormatDateTime)
|
|
|
- // SendWxMsgWithArticleClassToAdmin(keyword1, keyword2, keyword3, keyword4, openIdListByAppointment, artcleId)
|
|
|
- //
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- //}
|
|
|
-
|
|
|
//【公司调研】系列纪要发布/更新后 end
|
|
|
|
|
|
//查研观向6.9模板消息推送规则
|