Переглянути джерело

fix:交付地址格式修改

duxin 9 місяців тому
батько
коміт
cf18ab1227

+ 2 - 0
rpc/consumer/internal/logic/infochangelogic.go

@@ -75,6 +75,8 @@ func (l *InfoChangeLogic) InfoChange(in *consumerinfo.InfoDetailReq) (*consumeri
 				Results.Detail = mc.InterfaceToStr(data["detail"])
 				Results.JyPublishingMedia = mc.Int64All(data["publishing_media"])
 				Results.RecommendedService = mc.Int64All(data["recommended_service"])
+				deliveryAddress := mc.StringToMap(mc.InterfaceToStr(data["deliveryAddress"]))
+				Results.DeliveryAddress = fmt.Sprintf(`%s%s%s%s`, deliveryAddress["area"], deliveryAddress["city"], deliveryAddress["districts"], deliveryAddress["detailsAddr"])
 				Results.DeliveryAddress = mc.InterfaceToStr(data["deliveryAddress"])
 				if data["related_id"] != nil && mc.IntAll(data["related_id"]) != 0 {
 					Related.Id = se.SE.EncodeString(mc.InterfaceToStr(data["related_id"]))

+ 4 - 2
rpc/manager/internal/logic/infodetaillogic.go

@@ -4,6 +4,7 @@ import (
 	"app.yhyue.com/moapp/jyInfo/rpc/model"
 	se "app.yhyue.com/moapp/jybase/encrypt"
 	"context"
+	"fmt"
 	"log"
 	"strings"
 
@@ -29,7 +30,7 @@ func NewInfoDetailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *InfoDe
 	}
 }
 
-//InfoDetail 信息详情
+// InfoDetail 信息详情
 func (l *InfoDetailLogic) InfoDetail(in *manager.InfoDetailReq) (*manager.InfoDetailResp, error) {
 	//userid := in.UserId
 	var (
@@ -73,7 +74,8 @@ func (l *InfoDetailLogic) InfoDetail(in *manager.InfoDetailReq) (*manager.InfoDe
 			infoData.Detail = common.InterfaceToStr(data["detail"])
 			infoData.JyPublishingMedia = common.Int64All(data["publishing_media"])
 			infoData.RecommendedService = common.Int64All(data["recommended_service"])
-			infoData.DeliveryAddress = common.ObjToString(data["deliveryAddress"])
+			deliveryAddress := common.StringToMap(common.InterfaceToStr(data["deliveryAddress"]))
+			infoData.DeliveryAddress = fmt.Sprintf(`%s%s%s%s`, deliveryAddress["area"], deliveryAddress["city"], deliveryAddress["districts"], deliveryAddress["detailsAddr"])
 			if data["related_id"] != nil && common.IntAll(data["related_id"]) != 0 {
 				related.Id = se.SE.EncodeString(common.InterfaceToStr(data["related_id"])) //关联信息id加密
 				related.Title = common.InterfaceToStr(data["relatedTitle"])