| | |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.ServletUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.domain.MemoBook; |
| | | import com.ruoyi.domain.ZSecret; |
| | | import com.ruoyi.service.MemoBookService; |
| | | import com.ruoyi.service.ZSecretDownloadService; |
| | | import com.ruoyi.service.ZSecretService; |
| | | import com.ruoyi.service.ZSecretShareService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @Autowired |
| | | private ZSecretService zSecretService; |
| | | |
| | | @Autowired |
| | | private ZSecretShareService zSecretShareService; |
| | | |
| | | @Autowired |
| | | private ZSecretDownloadService zSecretDownloadService; |
| | | |
| | | @Autowired |
| | | private MemoBookService memoBookService; |
| | | |
| | | /** |
| | | * 查询所有记录 |
| | | */ |
| | |
| | | Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1); |
| | | Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10); |
| | | return zSecretService.selectDataList(zSecret,pageNum,pageSize); |
| | | } |
| | | |
| | | @GetMapping("/type") |
| | | public AjaxResult listType(){ |
| | | return zSecretService.listType(); |
| | | } |
| | | |
| | | /** |
| | |
| | | @DeleteMapping("/{ids}") |
| | | public AjaxResult remove(@PathVariable Long[] ids) |
| | | { |
| | | for (Long id: ids) { |
| | | List<MemoBook> memoBookService1 = memoBookService.selectByIdAFid(id,2031L); |
| | | if (!memoBookService.removeByIds(memoBookService1)) |
| | | return AjaxResult.error(); |
| | | } |
| | | if (! (zSecretDownloadService.deleteData(ids) && zSecretShareService.deleteByContentId(ids) ) ){ |
| | | return AjaxResult.error(); |
| | | } |
| | | return toAjax(zSecretService.removeByIds(Arrays.asList(ids))); |
| | | } |
| | | |