system
V2EX  ›  问与答

Service Logic 分层的一些问题!!求指教

  •  
  •   system · Aug 29, 2015 · 1750 views
    This topic created in 3940 days ago, the information mentioned may be changed or developed.

    我的 Service 层是提供给 Controller 的 API 接口,业务代码是写在 Service 层还是 Logic 层呢?

    比如会员需要充值一个功能:

    操作后会产生一系列事件。

    1 其中里面一个更新会员金币的操作,可能要更新 3 张张表。这个更新会员金币的操作要封装到 Logic 里 还是在 Service?

    2 如果用到 MYSQL 事务,这个事务要在 Logic 里还是 Service 里实现?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1070 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 50ms · UTC 18:25 · PVG 02:25 · LAX 11:25 · JFK 14:25
    ♥ Do have faith in what you're doing.