| | |
| | | import com.ruoyi.common.utils.ServletUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.domain.ZHonor; |
| | | import com.ruoyi.service.ZHonorDownloadService; |
| | | import com.ruoyi.service.ZHonorService; |
| | | import com.ruoyi.service.ZHonorShareService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @Autowired |
| | | private ZHonorService zHonorService; |
| | | |
| | | @Autowired |
| | | private ZHonorDownloadService zHonorDownloadService; |
| | | |
| | | @Autowired |
| | | private ZHonorShareService zHonorShareService; |
| | | |
| | | /** |
| | | * 查询所有记录 |
| | | */ |
| | |
| | | Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1); |
| | | Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10); |
| | | return zHonorService.selectDataList(zHonor,pageNum,pageSize); |
| | | } |
| | | |
| | | @GetMapping("/type") |
| | | public AjaxResult listType(){ |
| | | return zHonorService.listType(); |
| | | } |
| | | |
| | | /** |
| | |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | if (! (zHonorDownloadService.deleteData(ids) && zHonorShareService.deleteByContentId(ids) ) ){ |
| | | return AjaxResult.error(); |
| | | } |
| | | return toAjax(zHonorService.removeByIds(Arrays.asList(ids))); |
| | | } |
| | | |