| | |
| | | public R selectAll(@RequestBody CommonPage commonPage) { |
| | | return this.comActSocialOrgService.pageList(commonPage); |
| | | } |
| | | |
| | | /** |
| | | * 通过主键查询单条数据 |
| | | * |
| | | * @param id 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("{id}") |
| | | public R selectOne(@PathVariable("id") Long id) { |
| | | return this.comActSocialOrgService.selectById(id); |
| | | } |
| | | |
| | | /** |
| | | * 通过userId查询 |
| | | * |
| | | * @param userId 主键 |
| | | * @return 单条数据 |
| | | */ |
| | | @GetMapping("/selectByUserId") |
| | | public R selectOneByUserId(@RequestParam("userId") Long userId) { |
| | | return R.ok(this.comActSocialOrgService.getOne(new QueryWrapper<ComActSocialOrg>().lambda().eq(ComActSocialOrg::getUserId,userId))); |
| | | } |
| | | /** |
| | | * 新增数据 |
| | | * |