You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issues-translate-bot
changed the title
cmd/genservice: 推荐生成的service支持多实现
cmd/genservice: It is recommended that the generated service supports multiple implementations
Aug 18, 2024
@chehan01 gf gen serrice is kind of recommended practice. If you needed special requirements, you could custom for service gf gen service 只是一个推荐的作法,如果有特殊需求,可以自定义 service 层的实现
Description
在具体的业务实现中,有时需要对一个service去写多个不同的实现以应对不同的业务场景,目前GoFrame自动生成的service接口并不具备这个功能,我推荐自动生成的service可以参考以下格式:
这是我在实际业务中所用到的,如果以这种方式生成service层,那么在logic层注册和其他层调用时,既可以实现一个接口多个实现的调用,又可完美兼容原有的调用方式和逻辑。
望采纳。
Additional
No response
The text was updated successfully, but these errors were encountered: