liuxiaolong
2019-08-02 24e2d92df7cad99e1e514fa581fe59765dbc4a12
controllers/dbtablesCon.go
@@ -2,14 +2,12 @@
import (
   "basic.com/dbapi.git"
   "basic.com/pubsub/protomsg.git"
   "encoding/json"
   "fmt"
   "github.com/gin-gonic/gin"
   "github.com/satori/go.uuid"
   "log"
   "time"
   "webserver/discovery"
   "webserver/extend/code"
   "webserver/extend/config"
   "webserver/extend/esutil"
@@ -102,23 +100,23 @@
   result := changeEsRespData(data, "修改成功")
   if result["success"].(bool) {
      //code.Success.Message = "修改底库成功"
      if dbtable.Enable ==1 {
         discovery.AddDbMessage(&protomsg.EsPersonCacheChange{
            Type: protomsg.EsCacheChanged_T_DbTable,
            PersonId: "",
            TableId: []string{ dbtable.Id },
            Feature: "",
            Action: protomsg.DbAction_Insert,
         })
      } else {
         discovery.AddDbMessage(&protomsg.EsPersonCacheChange{
            Type: protomsg.EsCacheChanged_T_DbTable,
            PersonId: "",
            TableId: []string{ dbtable.Id },
            Feature: "",
            Action: protomsg.DbAction_Delete,
         })
      }
      //if dbtable.Enable ==1 {
      //   discovery.AddDbMessage(&protomsg.EsPersonCacheChange{
      //      Type: protomsg.EsCacheChanged_T_DbTable,
      //      PersonId: "",
      //      TableId: []string{ dbtable.Id },
      //      Feature: "",
      //      Action: protomsg.DbAction_Insert,
      //   })
      //} else {
      //   discovery.AddDbMessage(&protomsg.EsPersonCacheChange{
      //      Type: protomsg.EsCacheChanged_T_DbTable,
      //      PersonId: "",
      //      TableId: []string{ dbtable.Id },
      //      Feature: "",
      //      Action: protomsg.DbAction_Delete,
      //   })
      //}
      util.ResponseFormat(c, code.Success, result["data"])
   } else {
      //code.ServiceInsideError.Message += result["msg"].(string)