所有标签 查询返回
This commit is contained in:
parent
c25a0556bf
commit
e3b700a049
@ -79,17 +79,26 @@ public class LabelController {
|
||||
return success(BeanUtils.toBean(pageResult, LabelRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
@Operation(summary = "获得标签管理列表所有")
|
||||
@PreAuthorize("@ss.hasPermission('llm:label:query')")
|
||||
public CommonResult<List<LabelRespVO>> getLabelList() {
|
||||
List<LabelDO> list = labelService.getLabelList();
|
||||
return success(BeanUtils.toBean(list, LabelRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出标签管理 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('llm:label:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportLabelExcel(@Valid LabelPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
HttpServletResponse response) throws IOException {
|
||||
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<LabelDO> list = labelService.getLabelPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "标签管理.xls", "数据", LabelRespVO.class,
|
||||
BeanUtils.toBean(list, LabelRespVO.class));
|
||||
BeanUtils.toBean(list, LabelRespVO.class));
|
||||
}
|
||||
|
||||
}
|
@ -7,6 +7,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 标签管理 Service 接口
|
||||
@ -52,5 +53,7 @@ public interface LabelService {
|
||||
* @return 标签管理分页
|
||||
*/
|
||||
PageResult<LabelDO> getLabelPage(LabelPageReqVO pageReqVO);
|
||||
// 获取所有标签
|
||||
List<LabelDO> getLabelList();
|
||||
|
||||
}
|
@ -72,4 +72,9 @@ public class LabelServiceImpl implements LabelService {
|
||||
return labelMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LabelDO> getLabelList() {
|
||||
return labelMapper.selectList();
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user