| | |
| | | import com.ruoyi.basic.pojo.SupplierManage; |
| | | import com.ruoyi.collaborativeApproval.pojo.NoticeType; |
| | | import com.ruoyi.collaborativeApproval.service.NoticeTypeService; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Log; |
| | | import com.ruoyi.framework.aspectj.lang.enums.BusinessType; |
| | | import com.ruoyi.framework.web.domain.AjaxResult; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | @Log(title = "新增通知公告的公告类型", businessType = BusinessType.INSERT) |
| | | public AjaxResult add(@RequestBody NoticeType noticeType) { |
| | | return AjaxResult.success(noticeTypeService.saveOrUpdate(noticeType)); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/del") |
| | | @Log(title = "删除通知公告的公告类型", businessType = BusinessType.DELETE) |
| | | public AjaxResult delNoticeType(@RequestBody List<Integer> ids) { |
| | | if(CollectionUtils.isEmpty(ids)){ |
| | | return AjaxResult.error("请选择至少一条数据"); |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/list") |
| | | @Log(title = "查询通知公告的公告类型", businessType = BusinessType.OTHER) |
| | | public AjaxResult noticeTypeList() { |
| | | return AjaxResult.success(noticeTypeService.list()); |
| | | } |