mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-13 22:09:00 +08:00
✨ Introducing new features. closed #3045 【新特性】common-excel 模块
This commit is contained in:
1 parent
3ffb08968a
commit
109dc634e6
12 files changed
+81
-13
No files matched your search
@@ -24,11 +24,13 @@ import com.pig4cloud.pigx.common.log.annotation.SysLog;
|
||||
import ${package}.${moduleName}.entity.${className};
|
||||
import ${package}.${moduleName}.service.${className}Service;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import com.pig4cloud.pigx.common.excel.annotation.ResponseExcel;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ${comments}
|
||||
@@ -109,4 +111,16 @@ public class ${className}Controller {
|
||||
return R.ok(${classname}Service.removeById(${pk.lowerAttrName}));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出excel 表格
|
||||
* @param ${classname} 查询条件
|
||||
* @return excel 文件流
|
||||
*/
|
||||
@ResponseExcel
|
||||
@GetMapping("/export")
|
||||
@PreAuthorize("@pms.hasPermission('${moduleName}_${pathName}_export')" )
|
||||
public List<${className}> export(${className} ${classname}) {
|
||||
return ${classname}Service.list(Wrappers.query(${classname}));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user