12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- package com.fjhx.common.controller.patent;
- import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
- import com.fjhx.common.entity.patent.dto.PatentDto;
- import com.fjhx.common.entity.patent.dto.PatentSelectDto;
- import com.fjhx.common.entity.patent.vo.PatentVo;
- import com.fjhx.common.service.patent.PatentService;
- import com.ruoyi.common.annotation.Log;
- import com.ruoyi.common.core.domain.BaseSelectDto;
- import com.ruoyi.common.enums.BusinessType;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.RequestBody;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- /**
- * <p>
- * 专利 前端控制器
- * </p>
- *
- * @author
- * @since 2024-03-24
- */
- @RestController
- @RequestMapping("/patent")
- public class PatentController {
- @Autowired
- private PatentService patentService;
- /**
- * 专利分页
- */
- @PostMapping("/page")
- public Page<PatentVo> page(@RequestBody PatentSelectDto dto) {
- return patentService.getPage(dto);
- }
- /**
- * 专利明细
- */
- @PostMapping("/detail")
- public PatentVo detail(@RequestBody BaseSelectDto dto) {
- return patentService.detail(dto.getId());
- }
- /**
- * 专利新增
- */
- @Log(title = "专利管理", businessType = BusinessType.INSERT)
- @PostMapping("/add")
- public void add(@RequestBody PatentDto patentDto) {
- patentService.add(patentDto);
- }
- /**
- * 专利编辑
- */
- @Log(title = "专利管理", businessType = BusinessType.UPDATE)
- @PostMapping("/edit")
- public void edit(@RequestBody PatentDto patentDto) {
- patentService.edit(patentDto);
- }
- /**
- * 专利删除
- */
- @Log(title = "专利管理", businessType = BusinessType.DELETE)
- @PostMapping("/delete")
- public void delete(@RequestBody BaseSelectDto dto) {
- patentService.delete(dto.getId());
- }
- }
|