| | |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.jfpt.catalog.entitly.catalog; |
| | | import org.springblade.jfpt.catalog.service.catalogService; |
| | | import org.springblade.jfpt.catalog.vo.catalogVO; |
| | | import org.springblade.system.vo.DeptVO; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springblade.jfpt.catalog.wrapper.catalogWrapper; |
| | | |
| | |
| | | String result = format.format(today); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 懒加载获取部门树形结构 |
| | | */ |
| | | @GetMapping("/lazy-tree") |
| | | public R<List<catalogVO>> lazyTree(String tenantId, Long parentId, BladeUser bladeUser) { |
| | | List<catalogVO> tree = catalogService.lazyTree(Func.toStrWithEmpty(tenantId, bladeUser.getTenantId()), parentId); |
| | | return R.data(tree); |
| | | } |
| | | |
| | | /** |
| | | * 获取部门树形结构 |
| | | * @return |
| | | */ |
| | | @GetMapping("/tree") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "树形结构", notes = "树形结构") |
| | | public R<List<catalogVO>> tree() { |
| | | List<catalogVO> tree = catalogService.tree(); |
| | | return R.data(tree); |
| | | } |
| | | |
| | | } |