From 73ed18c9f59ae4adc545731977c1ce3a5c26b3f7 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期二, 06 八月 2019 11:20:17 +0800
Subject: [PATCH] add log
---
controllers/dbtablesCon.go | 41 ++++++++++++++++++++++-------------------
1 files changed, 22 insertions(+), 19 deletions(-)
diff --git a/controllers/dbtablesCon.go b/controllers/dbtablesCon.go
index d3f9f89..82daabe 100644
--- a/controllers/dbtablesCon.go
+++ b/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"
@@ -100,25 +98,30 @@
data := esutil.GetEsDataReq(url, params, false)
//c.JSON(200, changeEsRespData(data, "淇敼鎴愬姛"))
result := changeEsRespData(data, "淇敼鎴愬姛")
+ if dbtable.Enable == 0 {
+ res := UpdateDbPersonsOfDbTable(dbtable.Id)
+ //fmt.Println("鍚屾淇敼浜哄憳鐘舵�佹垚鍔�----",res)
+ logger.Debug("鍚屾淇敼浜哄憳鐘舵�佹垚鍔�----", res)
+ }
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)
--
Gitblit v1.8.0