仪器cms详情

master
Gitea 2 weeks ago
parent a35d0a1c7f
commit 701dda3592
  1. 13
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/instrument/controller/InstrumentController.java

@ -127,12 +127,13 @@ public class InstrumentController extends JeecgController<Instrument, IInstrumen
//@AutoLog(value = "仪器信息表-通过id查询") //@AutoLog(value = "仪器信息表-通过id查询")
@ApiOperation(value="仪器信息表-通过id查询", notes="仪器信息表-通过id查询") @ApiOperation(value="仪器信息表-通过id查询", notes="仪器信息表-通过id查询")
@GetMapping(value = "/queryByIdCms") @GetMapping(value = "/queryByIdCms")
public Result<Instrument> queryByIdCms(@RequestParam(name="id",required=true) String id) { public Result<IPage<Instrument>> queryByIdCms(@RequestParam(name="id",required=true) String id) {
Instrument instrument = instrumentService.getById(id); QueryWrapper<Instrument> queryWrapper = new QueryWrapper();
if(instrument==null) { queryWrapper.eq("id",id);
return Result.error("未找到对应数据"); Page<Instrument> page = new Page<Instrument>(1, 10);
} IPage<Instrument> pageList = instrumentService.page(page, queryWrapper);
return Result.OK(instrument);
return Result.OK(pageList);
} }
/** /**

Loading…
Cancel
Save