MakHoCheung
V2EX  ›  问与答

问下微服务架构下的参数定义

  •  
  •   MakHoCheung · Jan 18, 2022 · 1178 views
    This topic created in 1578 days ago, the information mentioned may be changed or developed.

    目前公司一般不给用 Map 作为参数或者返回

    目前知道的是 服务和服务之间用 DTO 服务到数据库服务之前 DTO 和 DO 转换

    疑问 前端到服务用 VO 还是 DTO ?

    2 replies    2022-01-18 16:22:55 +08:00
    RainCats
        1
    RainCats  
       Jan 18, 2022   ❤️ 1
    前端到后端:搞个 param 类,正删改查的参数全丢进去整内部类,在上家叫 param ,现在这家喜欢叫 dto 。
    返回给前端:用 vo ,然后也是各种内部类
    Junzhou
        2
    Junzhou  
       Jan 18, 2022   ❤️ 1
    遇事不决 DTO 前端进来 DTO ,到 service 也是 DTO ,跨服务调用也是 DTO
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5114 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 09:44 · PVG 17:44 · LAX 02:44 · JFK 05:44
    ♥ Do have faith in what you're doing.