系统基础结构修改
This commit is contained in:
@@ -5,6 +5,7 @@ import com.vetti.common.core.controller.BaseController;
|
||||
import com.vetti.common.core.domain.AjaxResult;
|
||||
import com.vetti.common.core.domain.R;
|
||||
import com.vetti.common.core.page.TableDataInfo;
|
||||
import com.vetti.common.core.page.TableWebDataInfo;
|
||||
import com.vetti.common.enums.BusinessType;
|
||||
import com.vetti.common.utils.poi.ExcelUtil;
|
||||
import com.vetti.hotake.domain.HotakeCvInfo;
|
||||
@@ -36,11 +37,11 @@ public class HotakeCvInfoController extends BaseController
|
||||
*/
|
||||
@ApiOperation("查询简历信息列表(分页)")
|
||||
@GetMapping("/getPagelist")
|
||||
public TableDataInfo list(HotakeCvInfo hotakeCvInfo)
|
||||
public TableWebDataInfo<HotakeCvInfo> list(HotakeCvInfo hotakeCvInfo)
|
||||
{
|
||||
startPage();
|
||||
List<HotakeCvInfo> list = hotakeCvInfoService.selectHotakeCvInfoList(hotakeCvInfo);
|
||||
return getDataTable(list);
|
||||
return getWebDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,6 +4,7 @@ import com.vetti.common.annotation.Log;
|
||||
import com.vetti.common.core.controller.BaseController;
|
||||
import com.vetti.common.core.domain.R;
|
||||
import com.vetti.common.core.page.TableDataInfo;
|
||||
import com.vetti.common.core.page.TableWebDataInfo;
|
||||
import com.vetti.common.enums.BusinessType;
|
||||
import com.vetti.hotake.domain.HotakeInitialScreeningQuestionsInfo;
|
||||
import com.vetti.hotake.service.IHotakeInitialScreeningQuestionsInfoService;
|
||||
@@ -33,11 +34,11 @@ public class HotakeInitialScreeningQuestionsInfoController extends BaseControlle
|
||||
*/
|
||||
@ApiOperation("查询初步筛选问题信息列表")
|
||||
@GetMapping("/getPageList")
|
||||
public TableDataInfo pageList(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo)
|
||||
public TableWebDataInfo<HotakeInitialScreeningQuestionsInfo> pageList(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo)
|
||||
{
|
||||
startPage();
|
||||
List<HotakeInitialScreeningQuestionsInfo> list = hotakeInitialScreeningQuestionsInfoService.selectHotakeInitialScreeningQuestionsInfoList(hotakeInitialScreeningQuestionsInfo);
|
||||
return getDataTable(list);
|
||||
return getWebDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,7 @@ import com.vetti.common.annotation.Log;
|
||||
import com.vetti.common.core.controller.BaseController;
|
||||
import com.vetti.common.core.domain.AjaxResult;
|
||||
import com.vetti.common.core.domain.R;
|
||||
import com.vetti.common.core.page.TableDataInfo;
|
||||
import com.vetti.common.core.page.TableWebDataInfo;
|
||||
import com.vetti.common.enums.BusinessType;
|
||||
import com.vetti.hotake.domain.HotakeRolesInfo;
|
||||
import com.vetti.hotake.domain.dto.HotakeRolesInfoDto;
|
||||
@@ -35,11 +35,11 @@ public class HotakeRolesInfoController extends BaseController
|
||||
*/
|
||||
@ApiOperation("查询岗位信息列表")
|
||||
@GetMapping("/getPageList")
|
||||
public TableDataInfo listPage(HotakeRolesInfo hotakeRolesInfo)
|
||||
public TableWebDataInfo<HotakeRolesInfo> listPage(HotakeRolesInfo hotakeRolesInfo)
|
||||
{
|
||||
startPage();
|
||||
List<HotakeRolesInfo> list = hotakeRolesInfoService.selectHotakeRolesInfoList(hotakeRolesInfo);
|
||||
return getDataTable(list);
|
||||
return getWebDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@ import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.vetti.common.core.page.*;
|
||||
import com.vetti.common.utils.*;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.WebDataBinder;
|
||||
@@ -14,10 +15,6 @@ import com.github.pagehelper.PageInfo;
|
||||
import com.vetti.common.constant.HttpStatus;
|
||||
import com.vetti.common.core.domain.AjaxResult;
|
||||
import com.vetti.common.core.domain.model.LoginUser;
|
||||
import com.vetti.common.utils.DateUtils;
|
||||
import com.vetti.common.utils.PageUtils;
|
||||
import com.vetti.common.utils.SecurityUtils;
|
||||
import com.vetti.common.utils.StringUtils;
|
||||
import com.vetti.common.utils.sql.SqlUtil;
|
||||
|
||||
/**
|
||||
@@ -85,7 +82,7 @@ public class BaseController
|
||||
rspData.setCode(HttpStatus.SUCCESS);
|
||||
rspData.setSuccess(true);
|
||||
rspData.setMessage("查询成功");
|
||||
rspData.setDatas(list);
|
||||
rspData.setData(list);
|
||||
rspData.setTotal(new PageInfo(list).getTotal());
|
||||
return rspData;
|
||||
}
|
||||
@@ -208,7 +205,7 @@ public class BaseController
|
||||
{
|
||||
TablePageDataInfo<T> pageDataInfo = new TablePageDataInfo<T>();
|
||||
|
||||
TableAppDataInfo<T> rspData = new TableAppDataInfo<T>();
|
||||
TableWebDataInfo<T> rspData = new TableWebDataInfo<T>();
|
||||
rspData.setData(list);
|
||||
rspData.setTotal(new PageInfo(list).getTotal());
|
||||
rspData.setPages(new PageInfo(list).getPages());
|
||||
@@ -219,4 +216,24 @@ public class BaseController
|
||||
|
||||
return pageDataInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 响应请求分页数据
|
||||
*/
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
protected <T> TableWebDataInfo<T> getWebDataTable(List<T> list)
|
||||
{
|
||||
TableWebDataInfo<T> rspData = new TableWebDataInfo<T>();
|
||||
rspData.setCode(HttpStatus.SUCCESS);
|
||||
rspData.setSuccess(true);
|
||||
rspData.setMessage(MessageUtils.messageCustomize("systemR10001"));
|
||||
rspData.setData(list);
|
||||
rspData.setTotal(new PageInfo(list).getTotal());
|
||||
rspData.setPages(new PageInfo(list).getPages());
|
||||
rspData.setPageNum(new PageInfo(list).getPageNum());
|
||||
rspData.setHasNextPage(new PageInfo(list).isHasNextPage());
|
||||
|
||||
|
||||
return rspData;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class TableDataInfo implements Serializable
|
||||
public class TableDataInfo<T> implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -16,7 +16,7 @@ public class TableDataInfo implements Serializable
|
||||
private long total;
|
||||
|
||||
/** 列表数据 */
|
||||
private List<?> datas;
|
||||
private List<T> data;
|
||||
|
||||
/** 消息状态码 */
|
||||
private int code;
|
||||
@@ -42,9 +42,9 @@ public class TableDataInfo implements Serializable
|
||||
* @param list 列表数据
|
||||
* @param total 总记录数
|
||||
*/
|
||||
public TableDataInfo(List<?> list, long total)
|
||||
public TableDataInfo(List<T> list, long total)
|
||||
{
|
||||
this.datas = list;
|
||||
this.data = list;
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
@@ -58,14 +58,14 @@ public class TableDataInfo implements Serializable
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public List<?> getDatas()
|
||||
public List<?> getData()
|
||||
{
|
||||
return datas;
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setDatas(List<?> rows)
|
||||
public void setData(List<T> rows)
|
||||
{
|
||||
this.datas = rows;
|
||||
this.data = rows;
|
||||
}
|
||||
|
||||
public int getCode()
|
||||
|
||||
@@ -25,7 +25,7 @@ public class TablePageDataInfo<T> implements Serializable {
|
||||
/**
|
||||
* 列表数据
|
||||
*/
|
||||
private TableAppDataInfo<T> data;
|
||||
private TableWebDataInfo<T> data;
|
||||
|
||||
/**
|
||||
* 表格数据对象
|
||||
@@ -39,7 +39,7 @@ public class TablePageDataInfo<T> implements Serializable {
|
||||
*
|
||||
* @param data 查询数据
|
||||
*/
|
||||
public TablePageDataInfo(TableAppDataInfo<T> data) {
|
||||
public TablePageDataInfo(TableWebDataInfo<T> data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
@@ -60,11 +60,11 @@ public class TablePageDataInfo<T> implements Serializable {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public TableAppDataInfo<T> getData() {
|
||||
public TableWebDataInfo<T> getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(TableAppDataInfo<T> data) {
|
||||
public void setData(TableWebDataInfo<T> data) {
|
||||
this.data = data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class TableAppDataInfo<T> implements Serializable {
|
||||
public class TableWebDataInfo<T> implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -22,6 +22,17 @@ public class TableAppDataInfo<T> implements Serializable {
|
||||
*/
|
||||
private List<T> data;
|
||||
|
||||
/** 消息状态码 */
|
||||
private int code;
|
||||
|
||||
/** 消息内容 */
|
||||
private String message;
|
||||
|
||||
/**
|
||||
* 成功标识
|
||||
*/
|
||||
private Boolean success;
|
||||
|
||||
/**
|
||||
* 当前页码
|
||||
*/
|
||||
@@ -37,20 +48,12 @@ public class TableAppDataInfo<T> implements Serializable {
|
||||
*/
|
||||
private boolean hasNextPage;
|
||||
|
||||
// /**
|
||||
// * 消息状态码
|
||||
// */
|
||||
// private int code;
|
||||
//
|
||||
// /**
|
||||
// * 消息内容
|
||||
// */
|
||||
// private String msg = "查询成功";
|
||||
|
||||
|
||||
/**
|
||||
* 表格数据对象
|
||||
*/
|
||||
public TableAppDataInfo() {
|
||||
public TableWebDataInfo() {
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -59,7 +62,7 @@ public class TableAppDataInfo<T> implements Serializable {
|
||||
* @param list 列表数据
|
||||
* @param total 总记录数
|
||||
*/
|
||||
public TableAppDataInfo(List<T> list, int total) {
|
||||
public TableWebDataInfo(List<T> list, int total) {
|
||||
this.data = list;
|
||||
this.total = total;
|
||||
}
|
||||
@@ -103,20 +106,29 @@ public class TableAppDataInfo<T> implements Serializable {
|
||||
public void setHasNextPage(boolean hasNextPage) {
|
||||
this.hasNextPage = hasNextPage;
|
||||
}
|
||||
// public int getCode() {
|
||||
// return code;
|
||||
// }
|
||||
//
|
||||
// public void setCode(int code) {
|
||||
// this.code = code;
|
||||
// }
|
||||
//
|
||||
// public String getMsg() {
|
||||
// return msg;
|
||||
// }
|
||||
//
|
||||
// public void setMsg(String msg) {
|
||||
// this.msg = msg;
|
||||
// }
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Boolean getSuccess() {
|
||||
return success;
|
||||
}
|
||||
|
||||
public void setSuccess(Boolean success) {
|
||||
this.success = success;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ public class GenController extends BaseController
|
||||
{
|
||||
TableDataInfo dataInfo = new TableDataInfo();
|
||||
List<GenTableColumn> list = genTableColumnService.selectGenTableColumnListByTableId(tableId);
|
||||
dataInfo.setDatas(list);
|
||||
dataInfo.setData(list);
|
||||
dataInfo.setTotal(list.size());
|
||||
return dataInfo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user