xyxie 1 rok temu
rodzic
commit
934be8a31e
3 zmienionych plików z 5 dodań i 1 usunięć
  1. 1 0
      .gitignore
  2. 1 0
      models/db.go
  3. 3 1
      services/base_from_yongyi.go

+ 1 - 0
.gitignore

@@ -6,6 +6,7 @@
 .DS_Store
 binlog/
 /eta_index_lib.exe
+/eta_index_lib.tar.gz
 /eta_index_lib.exe~
 eta_index_lib
 /static/imgs/python/*

+ 1 - 0
models/db.go

@@ -113,6 +113,7 @@ func initBaseIndex() {
 		new(BaseFromSmmClassify),
 		new(BaseFromYongyiIndex),
 		new(BaseFromYongyiData),
+		new(BaseFromYongyiClassify),
 	)
 }
 

+ 3 - 1
services/base_from_yongyi.go

@@ -54,7 +54,7 @@ func handleYongyiIndex(req *models.HandleYongyiExcelData) (err error) {
 	// 判断目录是否存在
 	var classifyId int64
 	now := time.Now()
-	if req.ClassifyName == "" {
+	if req.ClassifyName != "" {
 		classifyObj, err = classifyObj.GetByClassifyName(req.ClassifyName)
 		if err != nil {
 			if err.Error() == utils.ErrNoRow() {
@@ -229,6 +229,8 @@ func handleYongyiIndex(req *models.HandleYongyiExcelData) (err error) {
 		if edbInfo != nil {
 			go logic.RefreshBaseEdbInfo(edbInfo, ``)
 		}
+
+		// todo 更新到es库里
 	}
 	return
 }