| | |
| | | import com.ycl.system.AjaxResult; |
| | | import com.ycl.system.controller.BaseController; |
| | | import com.ycl.system.page.TableDataInfo; |
| | | import com.ycl.utils.poi.ExcelUtil; |
| | | import enumeration.BusinessType; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | /** |
| | | * 查询platform列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('platform:security:list')") |
| | | @PreAuthorize("@ss.hasPermi('imageResource:security:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(ImageResourceSecurity imageResourceSecurity) |
| | | { |
| | | startPage(); |
| | | List<ImageResourceSecurity> list = imageResourceSecurityService.selectImageResourceSecurityList(imageResourceSecurity); |
| | | return getDataTable(list); |
| | | } |
| | |
| | | /** |
| | | * 获取platform详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('platform:security:query')") |
| | | @PreAuthorize("@ss.hasPermi('imageResource:security:query')") |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) |
| | | { |
| | |
| | | { |
| | | return toAjax(imageResourceSecurityService.updateImageResourceSecurity(imageResourceSecurity)); |
| | | } |
| | | |
| | | /** |
| | | * 导入模板 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('imageResource:security:template')") |
| | | @Log(title = "导入模板", businessType = BusinessType.IMPORT) |
| | | @PostMapping("/importTemplate") |
| | | public void importTemplate(HttpServletResponse response) { |
| | | imageResourceSecurityService.importTemplate(response); |
| | | } |
| | | |
| | | /** |
| | | * 导入数据 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('imageResource:security:import')") |
| | | @Log(title = "导入", businessType = BusinessType.IMPORT) |
| | | @PostMapping("/importData") |
| | | public AjaxResult importData(MultipartFile file) { |
| | | return toAjax(imageResourceSecurityService.importData(file)); |
| | | } |
| | | |
| | | } |