1. 完成所有导出的功能
parent
d8a52a8c61
commit
c3df5bc62f
@ -1,19 +0,0 @@
|
||||
package cn.iocoder.dashboard.framework.excel;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Excel注解集
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Deprecated
|
||||
@Target(ElementType.FIELD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Excels
|
||||
{
|
||||
Excel[] value();
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package cn.iocoder.dashboard.modules.system.controller.dict.vo.data;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
@ApiModel("字典类型导出 Request VO")
|
||||
@Data
|
||||
public class SysDictDataExportReqVO {
|
||||
|
||||
@ApiModelProperty(value = "字典标签", example = "芋道")
|
||||
@Size(max = 100, message = "字典标签长度不能超过100个字符")
|
||||
private String label;
|
||||
|
||||
@ApiModelProperty(value = "字典类型", example = "sys_common_sex", notes = "模糊匹配")
|
||||
@Size(max = 100, message = "字典类型类型长度不能超过100个字符")
|
||||
private String dictType;
|
||||
|
||||
@ApiModelProperty(value = "展示状态", example = "1", notes = "参见 SysCommonStatusEnum 枚举类")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package cn.iocoder.dashboard.modules.system.controller.dict.vo.type;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ApiModel("字典类型分页列表 Request VO")
|
||||
@Data
|
||||
public class SysDictTypeExportReqVO {
|
||||
|
||||
@ApiModelProperty(value = "字典类型名称", example = "芋道", notes = "模糊匹配")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "字典类型", example = "sys_common_sex", notes = "模糊匹配")
|
||||
@Size(max = 100, message = "字典类型类型长度不能超过100个字符")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "展示状态", example = "1", notes = "参见 SysCommonStatusEnum 枚举类")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "开始时间", example = "2020-10-24")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date beginTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间", example = "2020-10-24")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date endTime;
|
||||
|
||||
}
|
||||
@ -1,30 +0,0 @@
|
||||
package cn.iocoder.dashboard.modules.system.controller.permission.vo.role;
|
||||
|
||||
import cn.iocoder.dashboard.framework.excel.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 角色 Excel 导出响应 VO
|
||||
*/
|
||||
@Data
|
||||
public class SysRoleExcelRespVO {
|
||||
|
||||
@Excel(name = "角色序号", cellType = Excel.ColumnType.NUMERIC)
|
||||
private Long id;
|
||||
|
||||
@Excel(name = "角色名称")
|
||||
private String name;
|
||||
|
||||
@Excel(name = "角色标志")
|
||||
private String code;
|
||||
|
||||
@Excel(name = "角色排序")
|
||||
private Integer sort;
|
||||
|
||||
@Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限")
|
||||
private Integer dataScope;
|
||||
|
||||
@Excel(name = "角色状态", readConverterExp = "0=正常,1=停用")
|
||||
private String status;
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package cn.iocoder.dashboard.modules.system.controller.permission.vo.role;
|
||||
|
||||
import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.dashboard.framework.excel.core.convert.DictConvert;
|
||||
import cn.iocoder.dashboard.modules.system.enums.dict.DictTypeEnum;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 角色 Excel 导出响应 VO
|
||||
*/
|
||||
@Data
|
||||
public class SysRoleExcelVO {
|
||||
|
||||
@ExcelProperty("角色序号")
|
||||
private Long id;
|
||||
|
||||
@ExcelProperty("角色名称")
|
||||
private String name;
|
||||
|
||||
@ExcelProperty("角色标志")
|
||||
private String code;
|
||||
|
||||
@ExcelProperty("角色排序")
|
||||
private Integer sort;
|
||||
|
||||
@ExcelProperty("数据范围")
|
||||
private Integer dataScope;
|
||||
|
||||
@ExcelProperty(value = "角色状态", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeEnum.SYS_COMMON_STATUS)
|
||||
private String status;
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package cn.iocoder.dashboard.modules.system.controller.permission.vo.role;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import static cn.iocoder.dashboard.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@ApiModel("角色分页 Request VO")
|
||||
@Data
|
||||
public class SysRoleExportReqVO {
|
||||
|
||||
@ApiModelProperty(value = "角色名称", example = "芋道", notes = "模糊匹配")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "角色标识", example = "yudao", notes = "模糊匹配")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value = "展示状态", example = "1", notes = "参见 SysCommonStatusEnum 枚举类")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "开始时间", example = "2020-10-24")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date beginTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间", example = "2020-10-24")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private Date endTime;
|
||||
|
||||
}
|
||||
@ -1,52 +0,0 @@
|
||||
package cn.iocoder.dashboard.modules.system.controller.user.vo.user;
|
||||
|
||||
import cn.iocoder.dashboard.framework.excel.Excel;
|
||||
import cn.iocoder.dashboard.framework.excel.Excels;
|
||||
import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.dept.SysDeptDO;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 用户 Excel 导出响应 VO
|
||||
*/
|
||||
@Data
|
||||
public class SysUserExcelRespBackVO {
|
||||
|
||||
@Excel(name = "用户序号", cellType = Excel.ColumnType.NUMERIC, prompt = "用户编号")
|
||||
private Long id;
|
||||
|
||||
@Excel(name = "登录名称")
|
||||
private String username;
|
||||
|
||||
@Excel(name = "用户名称")
|
||||
private String nickname;
|
||||
|
||||
@Excel(name = "部门编号", type = Excel.Type.IMPORT)
|
||||
private Long deptId;
|
||||
|
||||
@Excel(name = "用户邮箱")
|
||||
private String email;
|
||||
|
||||
@Excel(name = "手机号码")
|
||||
private String mobile;
|
||||
|
||||
@Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
|
||||
private String sex;
|
||||
|
||||
@Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
|
||||
private Integer status;
|
||||
|
||||
@Excel(name = "最后登录IP", type = Excel.Type.EXPORT)
|
||||
private String loginIp;
|
||||
|
||||
@Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Excel.Type.EXPORT)
|
||||
private Date loginDate;
|
||||
|
||||
@Excels({
|
||||
@Excel(name = "部门名称", targetAttr = "deptName", type = Excel.Type.EXPORT),
|
||||
@Excel(name = "部门负责人", targetAttr = "leader", type = Excel.Type.EXPORT)
|
||||
})
|
||||
private SysDeptDO dept;
|
||||
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package cn.iocoder.dashboard.modules.system.controller.user.vo.user;
|
||||
|
||||
import cn.iocoder.dashboard.framework.excel.core.annotations.DictFormat;
|
||||
import cn.iocoder.dashboard.framework.excel.core.convert.DictConvert;
|
||||
import cn.iocoder.dashboard.modules.system.enums.dict.DictTypeEnum;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 用户 Excel 导入 VO
|
||||
*/
|
||||
@Data
|
||||
public class SysUserImportExcelVO {
|
||||
|
||||
@ExcelProperty("登录名称")
|
||||
private String username;
|
||||
|
||||
@ExcelProperty("用户名称")
|
||||
private String nickname;
|
||||
|
||||
@ExcelProperty("部门编号")
|
||||
private Long deptId;
|
||||
|
||||
@ExcelProperty("用户邮箱")
|
||||
private String email;
|
||||
|
||||
@ExcelProperty("手机号码")
|
||||
private String mobile;
|
||||
|
||||
@ExcelProperty(value = "用户性别", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeEnum.SYS_USER_SEX)
|
||||
private String sex;
|
||||
|
||||
@ExcelProperty(value = "账号状态", converter = DictConvert.class)
|
||||
@DictFormat(DictTypeEnum.SYS_COMMON_STATUS)
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue