bugfix-去除RoleExportExcelVO
parent
59fc020616
commit
532e8333f2
|
@ -93,8 +93,8 @@ public class RoleController {
|
||||||
exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||||
List<RoleDO> list = roleService.getRolePage(exportReqVO).getList();
|
List<RoleDO> list = roleService.getRolePage(exportReqVO).getList();
|
||||||
// 输出
|
// 输出
|
||||||
ExcelUtils.write(response, "角色数据.xls", "数据", RoleExportExcelVO.class,
|
ExcelUtils.write(response, "角色数据.xls", "数据", RoleRespVO.class,
|
||||||
BeanUtils.toBean(list, RoleExportExcelVO.class));
|
BeanUtils.toBean(list, RoleRespVO.class));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
|
||||||
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
|
||||||
import cn.iocoder.yudao.module.system.enums.DictTypeConstants;
|
|
||||||
import com.alibaba.excel.annotation.ExcelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
public class RoleExportExcelVO {
|
|
||||||
|
|
||||||
@ExcelProperty("角色序号")
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
@ExcelProperty("角色名称")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
@ExcelProperty("角色标志")
|
|
||||||
private String code;
|
|
||||||
|
|
||||||
@ExcelProperty("角色排序")
|
|
||||||
private Integer sort;
|
|
||||||
|
|
||||||
@ExcelProperty(value = "角色状态", converter = DictConvert.class)
|
|
||||||
@DictFormat(DictTypeConstants.COMMON_STATUS)
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
@ExcelProperty(value = "数据范围", converter = DictConvert.class)
|
|
||||||
@DictFormat(DictTypeConstants.DATA_SCOPE)
|
|
||||||
private Integer dataScope;
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,5 +1,10 @@
|
||||||
package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role;
|
package cn.iocoder.yudao.module.system.controller.admin.permission.vo.role;
|
||||||
|
|
||||||
|
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
|
||||||
|
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
|
||||||
|
import cn.iocoder.yudao.module.system.enums.DictTypeConstants;
|
||||||
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import jakarta.validation.constraints.NotBlank;
|
import jakarta.validation.constraints.NotBlank;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
@ -9,22 +14,29 @@ import java.util.Set;
|
||||||
|
|
||||||
@Schema(description = "管理后台 - 角色信息 Response VO")
|
@Schema(description = "管理后台 - 角色信息 Response VO")
|
||||||
@Data
|
@Data
|
||||||
|
@ExcelIgnoreUnannotated
|
||||||
public class RoleRespVO {
|
public class RoleRespVO {
|
||||||
|
|
||||||
@Schema(description = "角色编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "角色编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@ExcelProperty("角色序号")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@Schema(description = "角色名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "管理员")
|
@Schema(description = "角色名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "管理员")
|
||||||
|
@ExcelProperty("角色名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@Schema(description = "角色标志", requiredMode = Schema.RequiredMode.REQUIRED, example = "admin")
|
@Schema(description = "角色标志", requiredMode = Schema.RequiredMode.REQUIRED, example = "admin")
|
||||||
@NotBlank(message = "角色标志不能为空")
|
@NotBlank(message = "角色标志不能为空")
|
||||||
|
@ExcelProperty("角色标志")
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
@Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
@Schema(description = "显示顺序", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||||
|
@ExcelProperty("角色排序")
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@ExcelProperty(value = "角色状态", converter = DictConvert.class)
|
||||||
|
@DictFormat(DictTypeConstants.COMMON_STATUS)
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
@Schema(description = "角色类型,参见 RoleTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "角色类型,参见 RoleTypeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@ -34,6 +46,8 @@ public class RoleRespVO {
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
@Schema(description = "数据范围,参见 DataScopeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "数据范围,参见 DataScopeEnum 枚举类", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
|
@ExcelProperty(value = "数据范围", converter = DictConvert.class)
|
||||||
|
@DictFormat(DictTypeConstants.DATA_SCOPE)
|
||||||
private Integer dataScope;
|
private Integer dataScope;
|
||||||
|
|
||||||
@Schema(description = "数据范围(指定部门数组)", example = "1")
|
@Schema(description = "数据范围(指定部门数组)", example = "1")
|
||||||
|
|
Loading…
Reference in New Issue