| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.basic.pojo.SupplierManageFile; |
| | | import com.ruoyi.basic.service.SupplierManageFileService; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import com.ruoyi.framework.web.controller.BaseController; |
| | | import com.ruoyi.framework.web.domain.R; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/basic/supplierManageFile") |
| | | public class SupplierManageFileController { |
| | | public class SupplierManageFileController extends BaseController { |
| | | |
| | | |
| | | @Resource |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody SupplierManageFile supplierManageFile) { |
| | | return AjaxResult.success(supplierManageFileService.save(supplierManageFile)); |
| | | public R<?> add(@RequestBody SupplierManageFile supplierManageFile) { |
| | | return R.ok(supplierManageFileService.save(supplierManageFile)); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/del") |
| | | public AjaxResult delSupplierManageFile(@RequestBody List<Integer> ids) { |
| | | public R<?> delSupplierManageFile(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | | return R.fail("请选择至少一条数据"); |
| | | } |
| | | //删除检验附件 |
| | | return AjaxResult.success(supplierManageFileService.removeBatchByIds(ids)); |
| | | return R.ok(supplierManageFileService.removeBatchByIds(ids)); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/listPage") |
| | | public AjaxResult supplierManageFileListPage(Page page, SupplierManageFile supplierManageFile) { |
| | | return AjaxResult.success(supplierManageFileService.supplierManageFileListPage(page, supplierManageFile)); |
| | | public R<?> supplierManageFileListPage(Page page, SupplierManageFile supplierManageFile) { |
| | | return R.ok(supplierManageFileService.supplierManageFileListPage(page, supplierManageFile)); |
| | | } |
| | | |
| | | |