Search in sources :

Example 1 with TableDataInfo

use of com.ruoyi.common.core.web.page.TableDataInfo in project RuoYi-Cloud by yangzongzhuan.

the class GenController method columnList.

/**
 * 查询数据表字段列表
 */
@GetMapping(value = "/column/{tableId}")
public TableDataInfo columnList(Long tableId) {
    TableDataInfo dataInfo = new TableDataInfo();
    List<GenTableColumn> list = genTableColumnService.selectGenTableColumnListByTableId(tableId);
    dataInfo.setRows(list);
    dataInfo.setTotal(list.size());
    return dataInfo;
}
Also used : GenTableColumn(com.ruoyi.gen.domain.GenTableColumn) TableDataInfo(com.ruoyi.common.core.web.page.TableDataInfo) GetMapping(org.springframework.web.bind.annotation.GetMapping)

Example 2 with TableDataInfo

use of com.ruoyi.common.core.web.page.TableDataInfo in project RuoYi-Cloud-Oracle by yangzongzhuan.

the class BaseController method getDataTable.

/**
 * 响应请求分页数据
 */
@SuppressWarnings({ "rawtypes", "unchecked" })
protected TableDataInfo getDataTable(List<?> list) {
    TableDataInfo rspData = new TableDataInfo();
    rspData.setCode(HttpStatus.SUCCESS);
    rspData.setRows(list);
    rspData.setMsg("查询成功");
    rspData.setTotal(new PageInfo(list).getTotal());
    return rspData;
}
Also used : PageInfo(com.github.pagehelper.PageInfo) TableDataInfo(com.ruoyi.common.core.web.page.TableDataInfo)

Example 3 with TableDataInfo

use of com.ruoyi.common.core.web.page.TableDataInfo in project RuoYi-Cloud-Oracle by yangzongzhuan.

the class GenController method columnList.

/**
 * 查询数据表字段列表
 */
@GetMapping(value = "/column/{tableId}")
public TableDataInfo columnList(Long tableId) {
    TableDataInfo dataInfo = new TableDataInfo();
    List<GenTableColumn> list = genTableColumnService.selectGenTableColumnListByTableId(tableId);
    dataInfo.setRows(list);
    dataInfo.setTotal(list.size());
    return dataInfo;
}
Also used : GenTableColumn(com.ruoyi.gen.domain.GenTableColumn) TableDataInfo(com.ruoyi.common.core.web.page.TableDataInfo) GetMapping(org.springframework.web.bind.annotation.GetMapping)

Example 4 with TableDataInfo

use of com.ruoyi.common.core.web.page.TableDataInfo in project RuoYi-Cloud by yangzongzhuan.

the class BaseController method getDataTable.

/**
 * 响应请求分页数据
 */
@SuppressWarnings({ "rawtypes", "unchecked" })
protected TableDataInfo getDataTable(List<?> list) {
    TableDataInfo rspData = new TableDataInfo();
    rspData.setCode(HttpStatus.SUCCESS);
    rspData.setRows(list);
    rspData.setMsg("查询成功");
    rspData.setTotal(new PageInfo(list).getTotal());
    return rspData;
}
Also used : PageInfo(com.github.pagehelper.PageInfo) TableDataInfo(com.ruoyi.common.core.web.page.TableDataInfo)

Aggregations

TableDataInfo (com.ruoyi.common.core.web.page.TableDataInfo)4 PageInfo (com.github.pagehelper.PageInfo)2 GenTableColumn (com.ruoyi.gen.domain.GenTableColumn)2 GetMapping (org.springframework.web.bind.annotation.GetMapping)2