| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.system.model.CaseType; |
| | | import com.ruoyi.system.model.ContractTemplateType; |
| | | import com.ruoyi.system.query.CaseTypeListQuery; |
| | | import com.ruoyi.system.query.ContractTemplateTypeListQuery; |
| | | import com.ruoyi.system.service.CaseTypeService; |
| | | import com.ruoyi.system.service.ContractTemplateTypeService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Arrays; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/case-type") |
| | | @Api(tags = "案件分类") |
| | | public class CaseTypeController { |
| | | @Resource |
| | | private CaseTypeService caseTypeService; |
| | | |
| | | @ApiOperation(value = "案件分类分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<CaseType>> pageList(@RequestBody CaseTypeListQuery query) { |
| | | return R.ok(caseTypeService.pageList(query)); |
| | | } |
| | | @ApiOperation(value = "添加") |
| | | @Log(title = "案件分类-添加", businessType = BusinessType.INSERT) |
| | | @PostMapping(value = "/add") |
| | | public R<Boolean> save(@RequestBody CaseType entity) { |
| | | return R.ok(caseTypeService.save(entity)); |
| | | } |
| | | @ApiOperation(value = "修改") |
| | | @Log(title = "案件分类-修改", businessType = BusinessType.UPDATE) |
| | | @PostMapping(value = "/edit") |
| | | public R<Boolean> edit(@RequestBody CaseType entity) { |
| | | return R.ok(caseTypeService.updateById(entity)); |
| | | } |
| | | @Log(title = "案件分类-删除", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "案件分类-删除") |
| | | @DeleteMapping(value = "/delete") |
| | | public R delete(@RequestParam String ids) { |
| | | caseTypeService.removeBatchByIds(Arrays.asList(ids.split(","))); |
| | | return R.ok(); |
| | | } |
| | | } |
| | | |