We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Note Manager 层提供原子的服务接口,Service 层负责依据业务逻辑来编排原子接口 实际开发中Manager层得使用建议 复杂业务,service提供数据给Manager层,负责业务编排 把事务下沉到Manager层,Manager层不允许相互调用,不会出现事务嵌套 专注于不带业务sql语言,也可以在manager层进行通用业务的dao层封装 避免复杂的join查询,在 manager 层拆分成简单SQL 对Service层通用能力的下沉, 如缓存方案、中间件通用处理 对第三方平台封装的层
Note Manager 层提供原子的服务接口,Service 层负责依据业务逻辑来编排原子接口 实际开发中Manager层得使用建议
Manager 层提供原子的服务接口,Service 层负责依据业务逻辑来编排原子接口
Manager层不允许相互调用
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
提供原子的服务接口(供serverice进行编排调用): /GetUser 方法在不同终端具有不同得行为
/GetUser 方法在不同终端具有不同得行为
在 APP 中展示用户信息的时候,如果用户不存在,那么要自动给用户创建一个用户
同时,要做一个 HTML5 的页面,HTML5 页面要保留之前的逻辑,也就是不需要创建用户
添加Manager层以后,Manager 层提供创建用户和获取用户信息的接口,而 Service 层负责将这两个接口组装起来
减小长事务且避免嵌套事务
// service: 典型没必要得长事务 @Transactional(rollbackFor = Throwable.class) public Result<String> upOrDown(Long departmentId, Long swapId) { // query 1 // query 2 // do update departmentDao.updateById(swapEntity); return Result.OK("success"); }
// service: 只进行 @Transactional(rollbackFor = Throwable.class) public Result<String> upOrDown(Long departmentId, Long swapId) { // query 1 // query 2 xxxManager.upOrDown(departmentSort,swapEntity); return Result.OK("success"); } // xxxManager @Transactional(rollbackFor = Throwable.class) public void upOrDown(DepartmentEntity departmentEntity ,DepartmentEntity swapEntity){ // do update departmentDao.updateById(swapEntity); }
No branches or pull requests
The text was updated successfully, but these errors were encountered: