Coder Social home page Coder Social logo

Comments (3)

billge1205 avatar billge1205 commented on May 1, 2024

action 可以调用 service 和 dao 用法跟dao是一样的 都是可以通过 $this->xxxService 来使用
service 中也可以通过 $this->xxxDAO 来调用数据库
如果你的IDE没有代码提示的话 可以在class上面添加 @Property 来让IDE认识service对象
可以参考示例:http://www.billge.cc/#overview-level

from biny.

billge1205 avatar billge1205 commented on May 1, 2024

privilegeService 这个文件的确是被框架特殊用了 作为鉴权的通过逻辑处理了
用户自定义Service文件可以在 /app/service/ 目录下自行创建使用

from biny.

lordGuan avatar lordGuan commented on May 1, 2024

感谢~明白了,仍然是Controller-Service-DAO的结构(这就很方便我把原有的JavaWeb项目进行移植了

from biny.

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.