|
|
|
@ -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); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|