Giter Site home page Giter Site logo

实践中dao层如何复用? about sniper HOT 2 CLOSED

flazx avatar flazx commented on May 7, 2024
实践中dao层如何复用?

from sniper.

Comments (2)

taoso avatar taoso commented on May 7, 2024

我们这边认为 dao 层跟 service 层不需要一一对应。对于商品,你应该设一个单独的 dao,比如叫 commodityDao,服务 shopAdmin 和 shopHome 都应该调用同一个 commodityDao,不同的业务逻辑都组织到 service 层,相同的逻辑下沉到 dao 层。

service 跟 dao 层是多对多的,一个服务可以调多个 dao,一个 dao 也可以让不同的服务调用。

from sniper.

flazx avatar flazx commented on May 7, 2024

非常感谢您的答复~~

from sniper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.