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

Loading…
Cancel
Save