rdluck 4 years ago
parent
commit
9407fbd576
3 changed files with 4 additions and 4 deletions
  1. 2 2
      models/tactics.go
  2. 1 1
      services/elastic.go
  3. 1 1
      services/task.go

+ 2 - 2
models/tactics.go

@@ -27,7 +27,7 @@ func GetTacticsList(endDate string) (list []*Tactics, err error) {
 				INNER JOIN article_content AS b ON a.id=b.article_id
 				INNER JOIN article_category AS c ON a.id=c.article_id
 				INNER JOIN article_categoryinfo AS d ON c.category_id=d.id
-				WHERE a.publish_status=1 AND a.publish_date>=? AND d.id IN (28,32,45,50,57,62,72,74,79,80,84,86,88,89,90) 
+				WHERE a.publish_status=1 AND a.publish_date>=? AND d.id IN (28,32,45,50,57,62,72,74,79,84,86,88,90) 
                 AND a.id NOT IN (3454,3456,3457,3459,2449,2450,2453,2454,2459,2530,2583,2663,2670,2699,2715,2732,2748,2759,2399,2356,2870,3173,2978,2826,3470) `
 	_, err = o.Raw(sql, endDate).QueryRows(&list)
 	return
@@ -41,7 +41,7 @@ func GetTacticsListAll() (list []*Tactics, err error) {
 			INNER JOIN article_content AS b ON a.id=b.article_id
 			INNER JOIN article_category AS c ON a.id=c.article_id
 			INNER JOIN article_categoryinfo AS d ON c.category_id=d.id
-			WHERE a.publish_status=1 AND d.id IN (28,32,45,50,57,62,72,74,79,80,84,86,88,89,90) 
+			WHERE a.publish_status=1 AND d.id IN (28,32,45,50,57,62,72,74,79,84,86,88,90) 
             AND a.id NOT IN (3454,3456,3457,3459,2449,2450,2453,2454,2459,2530,2583,2663,2670,2699,2715,2732,2748,2759,2399,2356,2870,3173,2978,2826,3470) `
 	//IN(85,71)
 	_, err = o.Raw(sql).QueryRows(&list)

+ 1 - 1
services/elastic.go

@@ -52,7 +52,7 @@ func EsCreateIndex(indexName, mappingJson string) (err error) {
 	return
 }
 
-//新增数据
+//新增和修改数据
 func EsAddOrEditData(indexName, docId string, item *ElasticTestArticleDetail) (err error) {
 	defer func() {
 		if err != nil {

+ 1 - 1
services/task.go

@@ -4,7 +4,6 @@ import (
 	"fmt"
 	"github.com/astaxie/beego/toolbox"
 	"hongze/hongze_cygx/utils"
-
 	//"github.com/astaxie/beego/cache"
 )
 
@@ -241,3 +240,4 @@ type ElasticTestArticleDetail struct {
 	Title            string `description:"标题"`
 	BodyText         string `description:"内容"`
 }
+