【更新】优化导出

pull/22/head
小诺 2021-06-01 00:15:28 +08:00 committed by 15099670051
parent bd6eb16124
commit 65a4c0d4ca
4 changed files with 15 additions and 0 deletions

View File

@ -24,6 +24,7 @@ Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意
*/
package vip.xiaonuo.sys.modular.pos.entity;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.*;
import vip.xiaonuo.core.pojo.base.entity.BaseEntity;
import lombok.Data;
@ -49,26 +50,31 @@ public class SysPos extends BaseEntity {
/**
*
*/
@Excel(name = "名称", width = 20)
private String name;
/**
*
*/
@Excel(name = "编码", width = 20)
private String code;
/**
*
*/
@Excel(name = "排序", width = 20)
private Integer sort;
/**
*
*/
@Excel(name = "备注", width = 20)
@TableField(insertStrategy = FieldStrategy.IGNORED)
private String remark;
/**
* 0 1 2
*/
@Excel(name = "状态", replace = {"正常_0", "停用_1", "删除_2"}, width = 20)
private Integer status;
}

View File

@ -69,4 +69,9 @@ public class SysPosParam extends BaseParam {
*
*/
private String remark;
/**
*
*/
private Integer status;
}

View File

@ -194,6 +194,8 @@ public class SysPosServiceImpl extends ServiceImpl<SysPosMapper, SysPos> impleme
@Override
public void export(SysPosParam sysPosParam) {
// 只导出状态正常的数据
sysPosParam.setStatus(CommonStatusEnum.ENABLE.getCode());
List<SysPos> list = this.list();
PoiUtil.exportExcelWithStream("SnowyPos.xls", SysPos.class, list);
}

View File

@ -435,6 +435,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
@Override
public void export(SysUserParam sysUserParam) {
// 只导出正常的
sysUserParam.setStatus(CommonStatusEnum.ENABLE.getCode());
List<SysUser> list = this.list();
PoiUtil.exportExcelWithStream("SonwyUsers.xls", SysUser.class, list);
}