| | |
| | | package com.vci.ubcs.code.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.vci.ubcs.code.dto.CodeReferConfigDTO; |
| | | import com.vci.ubcs.code.entity.CodeReferConfig; |
| | | import com.vci.ubcs.code.service.CodeReferConfigService; |
| | | import com.vci.ubcs.code.vo.CodeReferConfigVO; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 参照配置表(CodeReferConfig)表控制层 |
| | |
| | | */ |
| | | @GetMapping("getReferConfigPage") |
| | | public R<IPage<CodeReferConfigVO>> queryByPage(BladeQueryObject bladeQueryObject) { |
| | | return R.data(this.codeReferconfigService.queryByPage(bladeQueryObject)); |
| | | return R.data(this.codeReferconfigService.queryByJoinPage(bladeQueryObject)); |
| | | } |
| | | |
| | | /** |
| | | * 查询列表 |
| | | * @param codeReferConfigVO 筛选条件 |
| | | * @return 查询结果 |
| | | */ |
| | | @GetMapping("getReferConfigList") |
| | | public R<List<CodeReferConfigVO>> queryByList(CodeReferConfigVO codeReferConfigVO) { |
| | | return R.data(this.codeReferconfigService.queryByList(codeReferConfigVO)); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("getByOid") |
| | | public R<CodeReferConfig> queryById(@RequestParam("oid") String oid) { |
| | | public R<CodeReferConfigVO> queryById(@RequestParam("oid") String oid) { |
| | | return R.data(this.codeReferconfigService.queryById(oid)); |
| | | } |
| | | |
| | | /** |
| | | * 新增数据 |
| | | * |
| | | * @param codeReferConfig 实体 |
| | | * @param codeReferConfigVO 实体 |
| | | * @return 新增结果 |
| | | */ |
| | | @PostMapping("/save") |
| | | public R<CodeReferConfig> add(CodeReferConfig codeReferConfig) { |
| | | return R.data(this.codeReferconfigService.insert(codeReferConfig)); |
| | | @PostMapping("/addSave") |
| | | public R<CodeReferConfigVO> add(CodeReferConfigVO codeReferConfigVO) { |
| | | return this.codeReferconfigService.insert(codeReferConfigVO); |
| | | } |
| | | |
| | | /** |
| | | * 编辑数据 |
| | | * |
| | | * @param codeReferConfig 实体 |
| | | * @param codeReferConfigVO 实体 |
| | | * @return 编辑结果 |
| | | */ |
| | | @PutMapping("/edit") |
| | | public R<CodeReferConfig> edit(CodeReferConfig codeReferConfig) { |
| | | return R.data(this.codeReferconfigService.update(codeReferConfig)); |
| | | public R<CodeReferConfigVO> edit(CodeReferConfigVO codeReferConfigVO) { |
| | | return this.codeReferconfigService.update(codeReferConfigVO); |
| | | } |
| | | |
| | | /** |
| | | * 删除数据 |
| | | * |
| | | * @param id 主键 |
| | | * @param codeReferConfigDTO 主键 |
| | | * @return 删除是否成功 |
| | | */ |
| | | @DeleteMapping("/del") |
| | | public R<Boolean> deleteById(String id) { |
| | | return R.data(this.codeReferconfigService.deleteById(id)); |
| | | public R<Boolean> deleteById(CodeReferConfigDTO codeReferConfigDTO) { |
| | | return this.codeReferconfigService.deleteById(codeReferConfigDTO); |
| | | } |
| | | |
| | | } |