From 98d58d006fb9136dbbe8f0a42fc59a646126966d Mon Sep 17 00:00:00 2001 From: liuxiaolong <736321739@qq.com> Date: 星期六, 17 八月 2019 11:03:16 +0800 Subject: [PATCH] --- --- controllers/dbtableperson.go | 44 +------------------------------------------- 1 files changed, 1 insertions(+), 43 deletions(-) diff --git a/controllers/dbtableperson.go b/controllers/dbtableperson.go index 205d473..ca4a0d9 100644 --- a/controllers/dbtableperson.go +++ b/controllers/dbtableperson.go @@ -35,6 +35,7 @@ if dbperson.TableId == "" { // 搴曞簱id涓嶅瓨鍦� c.JSON(401, "TableId 涓嶅瓨鍦�") + return } result := addDbPerson(dbperson) if result["success"].(bool) { @@ -59,16 +60,6 @@ } params := string(personbytes) data, _ := esutil.PutEsDataReq(url, params) - //if data["_id"] !=""{ - // //閫氱煡姣斿杩涚▼缂撳瓨鏇存柊 - // discovery.AddDbMessage(&protomsg.EsPersonCacheChange{ - // Type: protomsg.EsCacheChanged_T_DbTablePerson, - // PersonId: personId, - // TableId: []string{ dbperson.TableId }, - // Feature: dbperson.FaceFeature, - // Action: protomsg.DbAction_Insert, - // }) - //} //c.JSON(200, changeEsRespData(data, "娣诲姞浜哄憳鎴愬姛")) result = changeEsRespData(data, "娣诲姞鎴愬姛") @@ -106,24 +97,6 @@ //c.JSON(200, changeEsRespData(data,"淇敼鎴愬姛")) result := changeEsRespData(data, "淇敼鎴愬姛") if result["success"].(bool) { - //code.Success.Message = "淇敼搴曞簱浜哄憳鎴愬姛" - //if dbperson.Enable == 1 { - // discovery.AddDbMessage(&protomsg.EsPersonCacheChange{ - // Type: protomsg.EsCacheChanged_T_DbTablePerson, - // PersonId: dbperson.Id, - // TableId: []string{ dbperson.TableId }, - // Feature: "", - // Action: protomsg.DbAction_Insert, - // }) - //} else { - // discovery.AddDbMessage(&protomsg.EsPersonCacheChange{ - // Type: protomsg.EsCacheChanged_T_DbTablePerson, - // PersonId: dbperson.Id, - // TableId: []string{ dbperson.TableId }, - // Feature: "", - // Action: protomsg.DbAction_Delete, - // }) - //} util.ResponseFormat(c, code.Success, result["data"]) } else { //code.ServiceInsideError.Message += result["msg"].(string) @@ -193,21 +166,6 @@ //c.JSON(200, changeEsRespData(data,"鍒犻櫎鎴愬姛")) result := changeEsRespData(data, "鍒犻櫎鎴愬姛") if result["success"].(bool) { - //code.Success.Message = "鍒犻櫎搴曞簱浜哄憳鎴愬姛" - //閫氱煡姣斿杩涚▼锛屾浜哄凡鍒犻櫎 - //dbperArr, e := esApi.Dbpersoninfosbyid([]string{uuid}, config.EsInfo.EsIndex.Dbtablepersons.IndexName, config.EsInfo.Masterip, config.EsInfo.Httpport) - //if e ==nil && len(dbperArr) > 0{ - // if dbperArr[0].TableId !=""{ - // discovery.AddDbMessage(&protomsg.EsPersonCacheChange{ - // Type: protomsg.EsCacheChanged_T_DbTablePerson, - // PersonId: uuid, - // TableId: []string{ dbperArr[0].TableId }, - // Feature: "", - // Action: protomsg.DbAction_Delete, - // }) - // } - //} - util.ResponseFormat(c, code.Success, result["data"]) } else { //code.ServiceInsideError.Message += result["msg"].(string) -- Gitblit v1.8.0