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