#
luxiaotao1123
2024-02-17 2b430bf3f4d6e84bd7ad351a6bcdd1d3a08c4630
zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/sys/controller/RoleController.java
@@ -10,10 +10,12 @@
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;
@@ -113,8 +115,8 @@
    @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);
    }
}