package cn.huge.module.aidata.controller;
|
|
import cn.huge.module.aidata.domain.po.DyhCaseInfoUnfold;
|
import cn.huge.module.aidata.service.IDyhCaseInfoUnfoldService;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.data.domain.Page;
|
import org.springframework.data.domain.PageRequest;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* 调解案件展开信息表 控制器
|
*/
|
@Slf4j
|
@RestController
|
@RequestMapping("/api/aidata/dyhCaseInfoUnfold")
|
public class DyhCaseInfoUnfoldController {
|
|
@Autowired
|
private IDyhCaseInfoUnfoldService dyhCaseInfoUnfoldService;
|
|
/**
|
* 保存对象
|
*/
|
@PostMapping
|
public DyhCaseInfoUnfold save(@RequestBody DyhCaseInfoUnfold entity) {
|
return dyhCaseInfoUnfoldService.saveDyhCaseInfoUnfold(entity);
|
}
|
|
/**
|
* 更新对象
|
*/
|
@PutMapping
|
public void update(@RequestBody DyhCaseInfoUnfold entity) {
|
dyhCaseInfoUnfoldService.updateDyhCaseInfoUnfold(entity);
|
}
|
|
/**
|
* 条件更新对象
|
*/
|
@PutMapping("/terms")
|
public void updateTerms(@RequestBody DyhCaseInfoUnfold entity, @RequestParam Map<String, Object> terms) {
|
dyhCaseInfoUnfoldService.updateDyhCaseInfoUnfoldTerms(entity, terms);
|
}
|
|
/**
|
* 删除对象
|
*/
|
@DeleteMapping("/{id}")
|
public void delete(@PathVariable String id) {
|
dyhCaseInfoUnfoldService.deleteDyhCaseInfoUnfold(id);
|
}
|
|
/**
|
* 获取对象列表
|
*/
|
@GetMapping("/list")
|
public List<DyhCaseInfoUnfold> list(@RequestParam Map<String, Object> terms) {
|
return dyhCaseInfoUnfoldService.listTerms(terms);
|
}
|
|
/**
|
* 获取分页对象列表
|
*/
|
@GetMapping("/page")
|
public Page<DyhCaseInfoUnfold> page(
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
|
@RequestParam Map<String, Object> terms) {
|
return dyhCaseInfoUnfoldService.pageTerms(PageRequest.of(pageNum - 1, pageSize), terms);
|
}
|
|
/**
|
* 获取对象详情
|
*/
|
@GetMapping("/{id}")
|
public DyhCaseInfoUnfold getInfo(@PathVariable String id) {
|
return dyhCaseInfoUnfoldService.getById(id);
|
}
|
}
|