master
Gitea 2 weeks ago
parent cfc9d0dd81
commit 60d4c5a99e
  1. 12
      jeecg-boot/jeecg-module-demo/src/main/java/org/jeecg/modules/demo/innovationvoucher/controller/InnovationVoucherController.java

@ -107,12 +107,12 @@ public class InnovationVoucherController extends JeecgController<InnovationVouch
//@AutoLog(value = "创新券表-通过id查询") //@AutoLog(value = "创新券表-通过id查询")
@ApiOperation(value="创新券表-通过id查询", notes="创新券表-通过id查询") @ApiOperation(value="创新券表-通过id查询", notes="创新券表-通过id查询")
@GetMapping(value = "/queryByIdCms") @GetMapping(value = "/queryByIdCms")
public Result<InnovationVoucher> queryByIdCms(@RequestParam(name="id",required=true) String id) { public Result<IPage<InnovationVoucher>> queryByIdCms(@RequestParam(name="id",required=true) String id) {
InnovationVoucher innovationVoucher = innovationVoucherService.getById(id); QueryWrapper<InnovationVoucher> queryWrapper = new QueryWrapper();
if(innovationVoucher==null) { queryWrapper.eq("id",id);
return Result.error("未找到对应数据"); Page<InnovationVoucher> page = new Page<InnovationVoucher>(1, 10);
} IPage<InnovationVoucher> pageList = innovationVoucherService.page(page, queryWrapper);
return Result.OK(innovationVoucher); return Result.OK(pageList);
} }
/** /**

Loading…
Cancel
Save