Commit 9bfb9d09 authored by sml's avatar sml

项目默认创建时间倒序

parent 697ed7a7
......@@ -2,6 +2,7 @@ package com.jz.dmp.modules.controller.bean;
import java.util.Date;
import com.jz.common.annotation.FieldAssist;
import com.jz.common.bean.BasePageBean;
import io.swagger.annotations.ApiModel;
......@@ -17,116 +18,142 @@ public class DmpProjectRequest extends BasePageBean {
* ID
*/
@ApiModelProperty(value = "ID")
@FieldAssist(orderBy = "ID")
private Integer id;
/**
* 管理员帐号
*/
@ApiModelProperty(value = "管理员帐号")
@FieldAssist(orderBy = "OWNER_ID")
private String ownerId;
/**
* 生产帐号
*/
@ApiModelProperty(value = "生产帐号")
@FieldAssist(orderBy = "PRODUCTION_ID")
private String productionId;
/**
* 数据仓库帐号
*/
@ApiModelProperty(value = "数据仓库帐号")
@FieldAssist(orderBy = "DATA_WAREHOUSE_ID")
private String dataWarehouseId;
/**
* 项目名称
*/
@ApiModelProperty(value = "项目名称")
@FieldAssist(orderBy = "NAME")
private String name;
/**
* 项目显示名称
*/
@ApiModelProperty(value = "项目显示名称")
@FieldAssist(orderBy = "DISPLAY_NAME")
private String displayName;
/**
* 项目描述
*/
@ApiModelProperty(value = "项目描述")
@FieldAssist(orderBy = "PROJECT_DESC")
private String projectDesc;
/**
* 发布目标
*/
@ApiModelProperty(value = "发布目标")
@FieldAssist(orderBy = "PUBLISH_TARGET_ID")
private Integer publishTargetId;
/**
* 启动调度周期
*/
@ApiModelProperty(value = "启动调度周期")
@FieldAssist(orderBy = "IS_ENABLE_SCHEDULER")
private String isEnableScheduler;
/**
* 允许在本项目中直接编辑任务和代码
*/
@ApiModelProperty(value = "允许在本项目中直接编辑任务和代码")
@FieldAssist(orderBy = "IS_EDIT_TASK_CODE")
private String isEditTaskCode;
/**
* 能否下载select结果
*/
@ApiModelProperty(value = "能否下载select结果")
@FieldAssist(orderBy = "IS_ENABLE_SELECT")
private String isEnableSelect;
/**
* 数据仓库项目名称
*/
@ApiModelProperty(value = "数据仓库项目名称")
@FieldAssist(orderBy = "DW_NAME")
private String dwName;
/**
* 数据仓库访问身份类型
*/
@ApiModelProperty(value = "数据仓库访问身份类型")
@FieldAssist(orderBy = "DW_ACCESS_TYPE")
private String dwAccessType;
/**
* 使用ACL授权
*/
@ApiModelProperty(value = "使用ACL授权")
@FieldAssist(orderBy = "DW_IS_ENABLE_ACL")
private String dwIsEnableAcl;
/**
* 允许对象创建者访问对象
*/
@ApiModelProperty(value = "允许对象创建者访问对象")
@FieldAssist(orderBy = "DW_IS_ENABLE_ACCESS_OBJ")
private String dwIsEnableAccessObj;
/**
* 允许对象创建者授权对象
*/
@ApiModelProperty(value = "允许对象创建者授权对象")
@FieldAssist(orderBy = "DW_IS_ENABLE_AUTH_OBJ")
private String dwIsEnableAuthObj;
/**
* 项目空间数据保护
*/
@ApiModelProperty(value = "项目空间数据保护")
@FieldAssist(orderBy = "DW_IS_PROTECT_DATA")
private String dwIsProtectData;
/**
* 数据状态
*/
@ApiModelProperty(value = "数据状态")
@FieldAssist(orderBy = "DATA_STATUS")
private String dataStatus;
/**
* 创建用户ID
*/
@ApiModelProperty(value = "创建用户ID")
@FieldAssist(orderBy = "CREATE_USER_ID")
private String createUserId;
/**
* 数据创建时间
*/
@ApiModelProperty(value = "数据创建时间")
@FieldAssist(orderBy = "CREATE_TIME")
private Date createTime;
/**
* 数据创建时间起
*/
......@@ -143,20 +170,30 @@ public class DmpProjectRequest extends BasePageBean {
* 创建用户ID
*/
@ApiModelProperty(value = "创建用户ID")
@FieldAssist(orderBy = "UPDATE_USER_ID")
private String updateUserId;
/**
*
*/
@ApiModelProperty(value = "")
@FieldAssist(orderBy = "IMPALA_JDBC_URL")
private String impalaJdbcUrl;
/**
*
*/
@ApiModelProperty(value = "")
@FieldAssist(orderBy = "IMPALA_MASTER_FQDN")
private String impalaMasterFqdn;
/**
* 数据更新时间
*/
@ApiModelProperty(value = "数据更新时间")
@FieldAssist(orderBy = "UPDATE_TIME")
private Date updateTime;
/**
* 数据更新时间起
*/
......
......@@ -14,6 +14,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.jz.common.bean.BaseBeanResponse;
......@@ -168,7 +169,19 @@ public class DmpProjectServiceImpl extends BaseService implements DmpProjectServ
param.put("updateTimeEnd", dmpProjectRequest.getUpdateTimeEnd());
}
PageHelper.startPage(dmpProjectRequest.getPageNum(), dmpProjectRequest.getPageSize());
// 如果没有设置排序,默认时间降序
if (StringUtils.isEmpty(dmpProjectRequest.getOrderColumn())) {
dmpProjectRequest.setOrderColumn("createTime");
dmpProjectRequest.setOrderType("DESC");
}
String obderByStr = dmpProjectRequest.takeOrderByStr(DmpProjectRequest.class);
Page page = null;
if (obderByStr==null) {
page = PageHelper.startPage(dmpProjectRequest.getPageNum(), dmpProjectRequest.getPageSize());
} else {
page = PageHelper.startPage(dmpProjectRequest.getPageNum(), dmpProjectRequest.getPageSize(), obderByStr);
}
List<DmpProject> dmpProjects = dmpProjectDao.findListByMap(param);
List<DmpProjectDto> list = MyDmpProjectConverter.INSTANCE().domain2dto(dmpProjects);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment