|
@@ -71,8 +71,8 @@ func (l *PublishInfoLogic) PublishInfo(in *consumerinfo.PublishInfoReq) (*consum
|
|
}
|
|
}
|
|
id = model.Mysql.Insert("supply_info", publishData)
|
|
id = model.Mysql.Insert("supply_info", publishData)
|
|
default:
|
|
default:
|
|
- publishData["publishing_media"] = in.JyPublishingMedia
|
|
|
|
- publishData["recommended_service"] = in.RecommendedService
|
|
|
|
|
|
+ publishData["publishing_media"] = in.JyPublishingMedia //是否同意剑鱼发布平台 1 是 -1 否
|
|
|
|
+ publishData["recommended_service"] = in.RecommendedService //是否推荐供应商 1 是 -1 否
|
|
publishData["related_id"] = mc.IntAll(se.SE.DecodeString(in.RelatedId)) //关联公告id
|
|
publishData["related_id"] = mc.IntAll(se.SE.DecodeString(in.RelatedId)) //关联公告id
|
|
publishData["project_code"] = in.Code //项目编号
|
|
publishData["project_code"] = in.Code //项目编号
|
|
publishData["industry"] = strings.Join(in.Industry, ",") //项目行业,多个逗号分隔
|
|
publishData["industry"] = strings.Join(in.Industry, ",") //项目行业,多个逗号分隔
|
|
@@ -104,17 +104,16 @@ func (l *PublishInfoLogic) PublishInfo(in *consumerinfo.PublishInfoReq) (*consum
|
|
}
|
|
}
|
|
log.Println("发送nsq敏感词信息", model.NsqConfig, appendInfo)
|
|
log.Println("发送nsq敏感词信息", model.NsqConfig, appendInfo)
|
|
nsq, err := util.NewNsqInfo(model.NsqConfig.Ip, model.NsqConfig.Topic, mc.InterfaceToStr(id), "1", mc.InterfaceToStr(in.MsgType), false, appendInfo)
|
|
nsq, err := util.NewNsqInfo(model.NsqConfig.Ip, model.NsqConfig.Topic, mc.InterfaceToStr(id), "1", mc.InterfaceToStr(in.MsgType), false, appendInfo)
|
|
-
|
|
|
|
if err != nil {
|
|
if err != nil {
|
|
- log.Println("初始化NSQ信息失败")
|
|
|
|
|
|
+ log.Println("初始化NSQ信息失败", err.Error())
|
|
res.ErrCode = -1
|
|
res.ErrCode = -1
|
|
- res.ErrMsg = err.Error()
|
|
|
|
|
|
+ res.ErrMsg = "信息发布失败"
|
|
return &res, nil
|
|
return &res, nil
|
|
}
|
|
}
|
|
- if err := nsq.NsqPushInfo(); err != nil {
|
|
|
|
|
|
+ if err = nsq.NsqPushInfo(); err != nil {
|
|
log.Println("发送nsq敏感词信息失败nsq++++++++++++", model.NsqConfig, appendInfo, err.Error())
|
|
log.Println("发送nsq敏感词信息失败nsq++++++++++++", model.NsqConfig, appendInfo, err.Error())
|
|
res.ErrCode = -1
|
|
res.ErrCode = -1
|
|
- res.ErrMsg = err.Error()
|
|
|
|
|
|
+ res.ErrMsg = "信息发布失败"
|
|
return &res, nil
|
|
return &res, nil
|
|
}
|
|
}
|
|
if in.MsgType == 3 {
|
|
if in.MsgType == 3 {
|