| | |
| | | import com.zy.asrs.wcs.common.domain.PageParam; |
| | | import com.zy.asrs.wcs.sys.entity.Role; |
| | | import com.zy.asrs.wcs.sys.service.RoleService; |
| | | import com.zy.asrs.wcs.utils.ExcelUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | |
| | | |
| | | @PreAuthorize("hasAuthority('sys:role:list')") |
| | | @PostMapping("/role/export") |
| | | public R export(@RequestBody Role role) { |
| | | return R.ok("导出成功"); |
| | | public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception { |
| | | ExcelUtil.build(ExcelUtil.create(roleService.list(), Role.class), response); |
| | | } |
| | | |
| | | } |