瀏覽代碼

feat:其他信息

wangshan 3 年之前
父節點
當前提交
cff69086de
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      rpc/consumer/internal/logic/supplyinfodetaillogic.go

+ 4 - 1
rpc/consumer/internal/logic/supplyinfodetaillogic.go

@@ -59,12 +59,15 @@ func (l *SupplyInfoDetailLogic) SupplyInfoDetail(in *consumerinfo.StatusReq) (*c
 			info.EntId = se.SE.Encode2HexByCheck(mc.InterfaceToStr((*data)["ent_id"]))
 			info.Id = in.MsgId
 			//其他供应信息
-			otherData := es.GetSupplyOtherInfoByEntid(mc.InterfaceToStr((*data)["ent_id"]), 5)
+			otherData := es.GetSupplyOtherInfoByEntid(mc.InterfaceToStr((*data)["ent_id"]), 6)
 			if otherData != nil && len(*otherData) > 0 {
 				for _, v := range *otherData {
 					if info.Id == se.SE.EncodeString(mc.InterfaceToStr(v["_id"])) {
 						continue
 					}
+					if len(info.OtherSupplyInfo) >= 5 {
+						break
+					}
 					otherSupplyInfo := consumerinfo.OtherSupplyInfoByEnt{
 						Title:       mc.InterfaceToStr(v["title"]),
 						Id:          se.SE.EncodeString(mc.InterfaceToStr(v["_id"])),