浏览代码

fix:appid

xmy 3 年之前
父节点
当前提交
45848ccea4
共有 2 个文件被更改,包括 9 次插入7 次删除
  1. 1 0
      api/internal/logic/mypublishdetaillogic.go
  2. 8 7
      rpc/common/test/es_test.go

+ 1 - 0
api/internal/logic/mypublishdetaillogic.go

@@ -33,6 +33,7 @@ func (l *MyPublishDetailLogic) MyPublishDetail(req *types.MyPublishCommonReq) (r
 		MsgId:   req.MsgId,
 		Type:    common.Int64All(req.Type),
 		MsgType: common.Int64All(req.MsgType),
+		AppId:   req.AppId,
 	})
 	if err0 != nil {
 		return &types.CommonRes{

+ 8 - 7
rpc/common/test/es_test.go

@@ -16,22 +16,23 @@ var configFile = flag.String("f", "../etc/common.yaml", "the config file")
 
 //es保存
 func Test_esSave(t *testing.T) {
-	conf.MustLoad(*configFile, &cf.CommonConfig)
+	var cfg cf.Config
+	conf.MustLoad(*configFile, &cfg)
 	//初始es
-	es := cf.CommonConfig.Es
+	es := cfg.Es
 	model.InitEs(&es)
 	log.Println(es.Addr, "----", es.Size)
 	elastic.InitElasticSize("http://192.168.3.206:9800", es.Size)
 	now := time.Now().Unix()
 	b := elastic.Save("supplyinfo_v1", "supplyinfo", &map[string]interface{}{
-		"_id":           "100006",
-		"id":            "100006",
+		"_id":           "100016",
+		"id":            "100016",
 		"msg_type":      "1",
-		"title":         "一个信息消息字段可以含有一个如下类型,以及与之对应在自动生成访问类中定义类型",
-		"detail":        "这个理解起来有些晦涩,举例来说上面例子中三个字段都是singular类型的字段,在编码后的消息体中可以有0或者1个query字段,但不会有多个",
+		"title":         "有趣信息",
+		"detail":        "一只公鹿,它走着走着,越走越快,最后它变成了高速公路(鹿)! ",
 		"ent_name":      "破产公司",
 		"province":      "河南",
-		"city":          "郑州市",
+		"city":          "南阳市",
 		"validity_time": now,
 		"create_time":   now,
 		"publish_time":  now,