Преглед на файлове

Merge branch 'crm/13.9' of http://8.136.199.33:3000/hongze/hz_crm_api into debug

xingzai преди 1 година
родител
ревизия
67a05c2832
променени са 3 файла, в които са добавени 7 реда и са изтрити 6 реда
  1. 3 2
      controllers/cygx/report_selection.go
  2. 3 3
      controllers/statistic_report.go
  3. 1 1
      models/cygx/resource_data.go

+ 3 - 2
controllers/cygx/report_selection.go

@@ -200,7 +200,7 @@ func (this *ReportSelectionController) PreserveAndPublish() {
 	//	}
 	//	existMap[v.ChartPermissionId] = v.ChartPermissionId 0
 	//}
-
+	go cygxService.UpdateReportSelectionResourceData(req.ArticleId) //首页最新页面数据逻辑处理 V11.1.1
 	br.Ret = 200
 	br.Success = true
 	br.Msg = "操作成功"
@@ -551,6 +551,7 @@ func (this *ReportSelectionController) PublishAndCancel() {
 		br.ErrMsg = "操作失败,Err:" + err.Error()
 		return
 	}
+	go cygxService.UpdateReportSelectionResourceData(articleId) //首页最新页面数据逻辑处理 V11.1.1
 	br.Ret = 200
 	br.Success = true
 	br.Msg = "操作成功"
@@ -931,7 +932,7 @@ func (this *ReportSelectionController) VisibleRange() {
 		br.ErrMsg = "操作失败,Err:" + err.Error()
 		return
 	}
-	cygxService.UpdateReportSelectionResourceData(articleId) //首页最新页面数据逻辑处理 V11.1.1
+	go cygxService.UpdateReportSelectionResourceData(articleId) //首页最新页面数据逻辑处理 V11.1.1
 	br.Ret = 200
 	br.Success = true
 	br.Msg = "操作成功"

+ 3 - 3
controllers/statistic_report.go

@@ -3432,13 +3432,13 @@ func (this *StatisticReportController) IncrementalCompanyList() {
 		}
 	}
 	//是否确认续约 CRM 13.9
-	conditionAscribRaiTotal += ` AND ( c.company_id IN (` + utils.GetOrmInReplace(len(noRenewedcompanyIds)) + `)   OR c.product_id = 1 )` // 已确认
+	conditionAscribRaiTotal += ` AND ( c.company_id IN (` + utils.GetOrmInReplace(len(noRenewedcompanyIds)) + `)   OR c.product_id = 1  OR   c.end_date <  '2023-01-01'  )   ` // 已确认
 	parsAscribeRaiTotal = append(parsAscribeRaiTotal, noRenewedcompanyIds)
 	if isConfirm != -1 {
 		if isConfirm == 0 {
-			conditionAscribRai += ` AND ( c.company_id NOT IN (` + utils.GetOrmInReplace(len(noRenewedcompanyIds)) + `)  AND  c.product_id = 2 ) ` // 待确认
+			conditionAscribRai += ` AND ( c.company_id NOT IN (` + utils.GetOrmInReplace(len(noRenewedcompanyIds)) + `)  AND  c.product_id = 2  AND  c.end_date >=  '2023-01-01' )  ` // 待确认
 		} else {
-			conditionAscribRai += ` AND ( c.company_id IN (` + utils.GetOrmInReplace(len(noRenewedcompanyIds)) + `)   OR c.product_id = 1 )` // 已确认
+			conditionAscribRai += ` AND ( c.company_id IN (` + utils.GetOrmInReplace(len(noRenewedcompanyIds)) + `)   OR c.product_id = 1  OR   c.end_date <  '2023-01-01' )    ` // 已确认
 		}
 		parsAscribeRai = append(parsAscribeRai, noRenewedcompanyIds)
 	}

+ 1 - 1
models/cygx/resource_data.go

@@ -52,7 +52,7 @@ func UpdateResourceData(sourceId int, source, publishDate string) (err error) {
 func UpdateResourceDataByItem(item *CygxResourceData) (err error) {
 	o := orm.NewOrm()
 	updateParams := make(map[string]interface{})
-	//updateParams["PublishDate"] = item.PublishDate
+	updateParams["PublishDate"] = item.PublishDate
 	updateParams["SearchTag"] = item.SearchTag
 	ptrStructOrTableName := "cygx_resource_data"
 	whereParam := map[string]interface{}{"source_id": item.SourceId, "source": item.Source}