ソースを参照

Merge branch 'master' of http://8.136.199.33:3000/hongze/hongze_cygx into cygx_9.3.1_0

xingzai 2 年 前
コミット
55e2177b9a
3 ファイル変更8 行追加7 行削除
  1. 1 0
      models/article.go
  2. 4 5
      services/article.go
  3. 3 2
      utils/config.go

+ 1 - 0
models/article.go

@@ -565,6 +565,7 @@ type ArticleResultApidate struct {
 	Corpus        Corpus                   `json:"corpus"`
 	Cover         string                   `json:"cover"`
 	TypeId        int                      `json:"type_id"`
+	IsActive      bool                     `json:"is_active"`
 }
 
 type ArticleField struct {

+ 4 - 5
services/article.go

@@ -714,8 +714,9 @@ func HandleArticleListByApi(artcleId int) (err error) {
 	item.Body = ""
 	item.Result = string(body)
 	go models.AddCygxShanghaiCompanyLog(item)
-
+	go models.UpdateCygxArticleCeluePush(artcleId)
 	articleResult := articleResultDate.Data
+
 	exitMap := make(map[int]int)
 	classMap := make(map[int]int)
 	reportMap := make(map[int]int)
@@ -752,8 +753,8 @@ func HandleArticleListByApi(artcleId int) (err error) {
 		return
 	}
 
-	//状态等于 2 跟 4 的进行同步
-	if exitMap[articleResult.SeriesId] > 0 && (articleResult.PublishStatus == 2 || articleResult.PublishStatus == 4) {
+	//状态等于 2 跟 4 的进行同步 IsActive 为false 软删除的也不同步
+	if exitMap[articleResult.SeriesId] > 0 && (articleResult.PublishStatus == 2 || articleResult.PublishStatus == 4) && articleResult.IsActive {
 		articleResult.PublishDate = time.Date(articleResult.PublishDate.Year(), articleResult.PublishDate.Month(), articleResult.PublishDate.Day(), articleResult.PublishDate.Hour(), articleResult.PublishDate.Minute(), articleResult.PublishDate.Second(), articleResult.PublishDate.Nanosecond(), time.Local)
 		item := new(models.Tactics2)
 		itemArticleData := new(models.CygxArticleData)
@@ -814,9 +815,7 @@ func HandleArticleListByApi(artcleId int) (err error) {
 			fmt.Println("UpdateArticlePublish Err:", err.Error())
 			return err
 		}
-
 		go UpdateResourceData(artcleId, "article", "delete", time.Now().Format(utils.FormatDateTime))
-		go models.UpdateCygxArticleCeluePush(artcleId)
 		return err
 	}
 

+ 3 - 2
utils/config.go

@@ -140,7 +140,7 @@ func init() {
 	SummaryArticleId = 1000000         //手动添加的纪要库开始ID
 	YanxSummaryPermissionId = 1001     //研选纪要分类ID
 	YanxViewpointPermissionId = 1002   //研选观点分类ID
-	WxMsgTemplateIdAskMsgMobileAll = "15557270714,18767183922,18621268829,15618524605"
+	WxMsgTemplateIdAskMsgMobileAll = "15557270714,18767183922,18621268829,18955528215"
 	WxMsgTemplateIdAskMsgMobilePublic = "15557270714,18767183922,18621268829"
 	HtgjDefaultSaleName = "王芳"
 	HtgjSalt = "HTGJ&HZ"
@@ -173,7 +173,8 @@ func init() {
 		WxMsgTemplateIdAskMsg = "PaoDanHGlt1kFw5q-4_ipJSwO3FyZpxSSNg4rwB7YCk"
 		WxMsgTemplateIdArticleUserRemind = "7qe3i4MrGxAIPhJeMgoqqw6j0A_foUB65DLSmxKe05s"
 		WxMsgTemplateIdAskMsgMobile = ""
-		ActSendMsgMobile = "15618524605"
+		//ActSendMsgMobile = "15618524605"
+		ActSendMsgMobile = "18955528215" // 汪洋手机号
 		ArticleTaskClassMobile = "15557270714,18767183922,15216736473,15000123056,18701809782,17706316791,18652179672"
 
 		ShangHaiCrmApiLink = "https://crm.hzinsights.com/"