Commit 5012b68b authored by mcb's avatar mcb

Merge branch 'dmp_dev' of http://gitlab.ioubuy.cn/yaobenzhang/jz-dmp-service into dmp_dev

parents c6fb901b 9bfb9d09
...@@ -2,6 +2,7 @@ package com.jz.dmp.modules.controller.bean; ...@@ -2,6 +2,7 @@ package com.jz.dmp.modules.controller.bean;
import java.util.Date; import java.util.Date;
import com.jz.common.annotation.FieldAssist;
import com.jz.common.bean.BasePageBean; import com.jz.common.bean.BasePageBean;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
...@@ -17,116 +18,142 @@ public class DmpProjectRequest extends BasePageBean { ...@@ -17,116 +18,142 @@ public class DmpProjectRequest extends BasePageBean {
* ID * ID
*/ */
@ApiModelProperty(value = "ID") @ApiModelProperty(value = "ID")
@FieldAssist(orderBy = "ID")
private Integer id; private Integer id;
/** /**
* 管理员帐号 * 管理员帐号
*/ */
@ApiModelProperty(value = "管理员帐号") @ApiModelProperty(value = "管理员帐号")
@FieldAssist(orderBy = "OWNER_ID")
private String ownerId; private String ownerId;
/** /**
* 生产帐号 * 生产帐号
*/ */
@ApiModelProperty(value = "生产帐号") @ApiModelProperty(value = "生产帐号")
@FieldAssist(orderBy = "PRODUCTION_ID")
private String productionId; private String productionId;
/** /**
* 数据仓库帐号 * 数据仓库帐号
*/ */
@ApiModelProperty(value = "数据仓库帐号") @ApiModelProperty(value = "数据仓库帐号")
@FieldAssist(orderBy = "DATA_WAREHOUSE_ID")
private String dataWarehouseId; private String dataWarehouseId;
/** /**
* 项目名称 * 项目名称
*/ */
@ApiModelProperty(value = "项目名称") @ApiModelProperty(value = "项目名称")
@FieldAssist(orderBy = "NAME")
private String name; private String name;
/** /**
* 项目显示名称 * 项目显示名称
*/ */
@ApiModelProperty(value = "项目显示名称") @ApiModelProperty(value = "项目显示名称")
@FieldAssist(orderBy = "DISPLAY_NAME")
private String displayName; private String displayName;
/** /**
* 项目描述 * 项目描述
*/ */
@ApiModelProperty(value = "项目描述") @ApiModelProperty(value = "项目描述")
@FieldAssist(orderBy = "PROJECT_DESC")
private String projectDesc; private String projectDesc;
/** /**
* 发布目标 * 发布目标
*/ */
@ApiModelProperty(value = "发布目标") @ApiModelProperty(value = "发布目标")
@FieldAssist(orderBy = "PUBLISH_TARGET_ID")
private Integer publishTargetId; private Integer publishTargetId;
/** /**
* 启动调度周期 * 启动调度周期
*/ */
@ApiModelProperty(value = "启动调度周期") @ApiModelProperty(value = "启动调度周期")
@FieldAssist(orderBy = "IS_ENABLE_SCHEDULER")
private String isEnableScheduler; private String isEnableScheduler;
/** /**
* 允许在本项目中直接编辑任务和代码 * 允许在本项目中直接编辑任务和代码
*/ */
@ApiModelProperty(value = "允许在本项目中直接编辑任务和代码") @ApiModelProperty(value = "允许在本项目中直接编辑任务和代码")
@FieldAssist(orderBy = "IS_EDIT_TASK_CODE")
private String isEditTaskCode; private String isEditTaskCode;
/** /**
* 能否下载select结果 * 能否下载select结果
*/ */
@ApiModelProperty(value = "能否下载select结果") @ApiModelProperty(value = "能否下载select结果")
@FieldAssist(orderBy = "IS_ENABLE_SELECT")
private String isEnableSelect; private String isEnableSelect;
/** /**
* 数据仓库项目名称 * 数据仓库项目名称
*/ */
@ApiModelProperty(value = "数据仓库项目名称") @ApiModelProperty(value = "数据仓库项目名称")
@FieldAssist(orderBy = "DW_NAME")
private String dwName; private String dwName;
/** /**
* 数据仓库访问身份类型 * 数据仓库访问身份类型
*/ */
@ApiModelProperty(value = "数据仓库访问身份类型") @ApiModelProperty(value = "数据仓库访问身份类型")
@FieldAssist(orderBy = "DW_ACCESS_TYPE")
private String dwAccessType; private String dwAccessType;
/** /**
* 使用ACL授权 * 使用ACL授权
*/ */
@ApiModelProperty(value = "使用ACL授权") @ApiModelProperty(value = "使用ACL授权")
@FieldAssist(orderBy = "DW_IS_ENABLE_ACL")
private String dwIsEnableAcl; private String dwIsEnableAcl;
/** /**
* 允许对象创建者访问对象 * 允许对象创建者访问对象
*/ */
@ApiModelProperty(value = "允许对象创建者访问对象") @ApiModelProperty(value = "允许对象创建者访问对象")
@FieldAssist(orderBy = "DW_IS_ENABLE_ACCESS_OBJ")
private String dwIsEnableAccessObj; private String dwIsEnableAccessObj;
/** /**
* 允许对象创建者授权对象 * 允许对象创建者授权对象
*/ */
@ApiModelProperty(value = "允许对象创建者授权对象") @ApiModelProperty(value = "允许对象创建者授权对象")
@FieldAssist(orderBy = "DW_IS_ENABLE_AUTH_OBJ")
private String dwIsEnableAuthObj; private String dwIsEnableAuthObj;
/** /**
* 项目空间数据保护 * 项目空间数据保护
*/ */
@ApiModelProperty(value = "项目空间数据保护") @ApiModelProperty(value = "项目空间数据保护")
@FieldAssist(orderBy = "DW_IS_PROTECT_DATA")
private String dwIsProtectData; private String dwIsProtectData;
/** /**
* 数据状态 * 数据状态
*/ */
@ApiModelProperty(value = "数据状态") @ApiModelProperty(value = "数据状态")
@FieldAssist(orderBy = "DATA_STATUS")
private String dataStatus; private String dataStatus;
/** /**
* 创建用户ID * 创建用户ID
*/ */
@ApiModelProperty(value = "创建用户ID") @ApiModelProperty(value = "创建用户ID")
@FieldAssist(orderBy = "CREATE_USER_ID")
private String createUserId; private String createUserId;
/**
* 数据创建时间
*/
@ApiModelProperty(value = "数据创建时间")
@FieldAssist(orderBy = "CREATE_TIME")
private Date createTime;
/** /**
* 数据创建时间起 * 数据创建时间起
*/ */
...@@ -143,20 +170,30 @@ public class DmpProjectRequest extends BasePageBean { ...@@ -143,20 +170,30 @@ public class DmpProjectRequest extends BasePageBean {
* 创建用户ID * 创建用户ID
*/ */
@ApiModelProperty(value = "创建用户ID") @ApiModelProperty(value = "创建用户ID")
@FieldAssist(orderBy = "UPDATE_USER_ID")
private String updateUserId; private String updateUserId;
/** /**
* *
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@FieldAssist(orderBy = "IMPALA_JDBC_URL")
private String impalaJdbcUrl; private String impalaJdbcUrl;
/** /**
* *
*/ */
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@FieldAssist(orderBy = "IMPALA_MASTER_FQDN")
private String impalaMasterFqdn; private String impalaMasterFqdn;
/**
* 数据更新时间
*/
@ApiModelProperty(value = "数据更新时间")
@FieldAssist(orderBy = "UPDATE_TIME")
private Date updateTime;
/** /**
* 数据更新时间起 * 数据更新时间起
*/ */
......
...@@ -14,6 +14,7 @@ import org.springframework.stereotype.Service; ...@@ -14,6 +14,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.jz.common.bean.BaseBeanResponse; import com.jz.common.bean.BaseBeanResponse;
...@@ -168,7 +169,19 @@ public class DmpProjectServiceImpl extends BaseService implements DmpProjectServ ...@@ -168,7 +169,19 @@ public class DmpProjectServiceImpl extends BaseService implements DmpProjectServ
param.put("updateTimeEnd", dmpProjectRequest.getUpdateTimeEnd()); 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<DmpProject> dmpProjects = dmpProjectDao.findListByMap(param);
List<DmpProjectDto> list = MyDmpProjectConverter.INSTANCE().domain2dto(dmpProjects); 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