| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.common.node.TreeIntegerNode; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.modules.label.entity.LabelEntity; |
| | |
| | | return R.data(LabelWrapper.build().pageVO(pages)); |
| | | } |
| | | |
| | | /** |
| | | * 标签管理 分页 |
| | | */ |
| | | @GetMapping("/tree") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "分页", notes = "传入label") |
| | | public R<List<LabelVO>> tree(LabelEntity label) { |
| | | List<LabelVO> pages = labelService.tree(label); |
| | | return R.data( pages); |
| | | } |
| | | |
| | | /** |
| | | * 标签管理 自定义分页 |
| | |
| | | @GetMapping("/getLabelList") |
| | | public R getLabelList(LabelVO label) { |
| | | return R.data(labelService.getLabelList(label)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询人员标签(不包含人这一级) |
| | | * @param label |
| | | * @return |
| | | */ |
| | | @GetMapping("/getPersonLabelList") |
| | | public R getPersonLabelList(LabelVO label) { |
| | | return R.data(labelService.getPersonLabelList(label)); |
| | | } |
| | | |
| | | /** |
| | | * 标签管理 分页 |
| | | */ |
| | | @GetMapping("/tree") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "树形接口", notes = "传入label") |
| | | public R<List<TreeIntegerNode>> tree(LabelVO label) { |
| | | List<TreeIntegerNode> pages = labelService.tree(label); |
| | | return R.data( pages); |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "新增或修改", notes = "传入label") |
| | | public R submit(@Valid @RequestBody LabelEntity label) { |
| | | label.setCreateUser(AuthUtil.getUserId()); |
| | | return R.status(labelService.saveOrUpdate(label)); |
| | | } |
| | | |