소스 검색

Revert "同步章节数据"

This reverts commit 0356998fcc0f4b0f7a518a2b3d05443d83e5b50b.
xyxie 11 달 전
부모
커밋
28ae5505e7
3개의 변경된 파일0개의 추가작업 그리고 54개의 파일을 삭제
  1. 0 9
      controllers/report_chapter_type.go
  2. 0 1
      models/report_chapter_type.go
  3. 0 44
      services/report_chapter_type_sync.go

+ 0 - 9
controllers/report_chapter_type.go

@@ -3,7 +3,6 @@ package controllers
 import (
 	"encoding/json"
 	"hongze/hz_crm_api/models"
-	"hongze/hz_crm_api/services"
 	"hongze/hz_crm_api/utils"
 )
 
@@ -61,7 +60,6 @@ func (this *ReportChapterTypeController) List() {
 			WordsImage:            list[i].YbBottomIcon, // 此处的不一样
 			EditImgUrl:            list[i].EditImgUrl,
 			IsShow:                list[i].IsShow,
-			Enabled:               list[i].Enabled,
 		})
 	}
 
@@ -138,13 +136,6 @@ func (this *ReportChapterTypeController) Edit() {
 		_ = utils.Rc.Delete(key)
 	}
 
-	// 同步eta系统的章节小程序配置
-	go func() {
-		var reqEta services.EditReportChapterTypeSyncReq
-		reqEta.ReportChapterTypeId = req.ReportChapterTypeId
-		_, _ = services.EditReportChapterTypeSync(&reqEta)
-	}()
-
 	br.Ret = 200
 	br.Success = true
 	br.Msg = "操作成功"

+ 0 - 1
models/report_chapter_type.go

@@ -333,7 +333,6 @@ type ReportChapterTypeListItem struct {
 	WordsImage            string `description:"带字的icon"`
 	EditImgUrl            string `description:"管理后台编辑时选用的图"`
 	IsShow                int    `description:"显示隐藏: 1-显示; 0-隐藏"`
-	Enabled               int    `description:"是否可用,1可用,0禁用"`
 }
 
 // ReportChapterTypeAddReq 新增章节类型请求体

+ 0 - 44
services/report_chapter_type_sync.go

@@ -1,44 +0,0 @@
-package services
-
-import (
-	"encoding/json"
-	"fmt"
-	"hongze/hz_crm_api/services/alarm_msg"
-	"hongze/hz_crm_api/utils"
-)
-
-type EditReportChapterTypeSyncReq struct {
-	ReportChapterTypeId int `description:"报告章节类型id"`
-}
-
-func EditReportChapterTypeSync(pars *EditReportChapterTypeSyncReq) (err error, errMsg string) {
-	defer func() {
-		if err != nil {
-			utils.FileLog.Info("同步章节小程序数据失败, Err: " + err.Error() + errMsg)
-			alarm_msg.SendAlarmMsg("同步章节小程序数据失败,Err:"+err.Error(), 3)
-		}
-	}()
-	if utils.CrmEtaServerUrl == "" {
-		return
-	}
-	url := fmt.Sprint(utils.CrmEtaServerUrl, "/api/eta/chapter_type/yb/sync")
-	b, err := crmEtaPost(url, pars)
-	if err != nil {
-		errMsg = "更新品种失败"
-		err = fmt.Errorf("url:%s err: %s", url, err.Error())
-		return
-	}
-	result := new(CrmEtaBaseResp)
-	if e := json.Unmarshal(b, &result); e != nil {
-		errMsg = "更新分类失败"
-		err = fmt.Errorf("result unmarshal err: %s\nresult: %s", e.Error(), string(b))
-		return
-	}
-	utils.FileLog.Info("%s", string(b))
-	if result.Code != 200 {
-		err = fmt.Errorf("result: %s, err: %s", string(b), result.ErrMsg)
-		errMsg = result.Msg
-		return
-	}
-	return
-}