feat(property): floor
This commit is contained in:
parent
8dbb2aab9d
commit
43933c83c5
@ -103,4 +103,16 @@ public class TbFloorController extends BaseController {
|
||||
@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(tbFloorService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据单元ID查询楼层
|
||||
*
|
||||
* @param unitId 单元ID
|
||||
* @return 楼层
|
||||
*/
|
||||
@GetMapping("/queryByUnitId/{unitId}")
|
||||
public R<List<TbFloorVo>> queryByUnitId(@NotNull(message = "单元ID不能为空")
|
||||
@PathVariable("unitId") Long unitId) {
|
||||
return R.ok(tbFloorService.queryByUnitId(unitId));
|
||||
}
|
||||
}
|
||||
|
@ -164,9 +164,10 @@ public class TbFloorServiceImpl implements ITbFloorService {
|
||||
* @return 楼层
|
||||
*/
|
||||
@Override
|
||||
public List<TbFloorVo> queryByUnitId(Long unitId){
|
||||
public List<TbFloorVo> queryByUnitId(Long unitId) {
|
||||
LambdaQueryWrapper<TbFloor> lqw = Wrappers.lambdaQuery();
|
||||
lqw.eq(TbFloor::getUnitId, unitId);
|
||||
lqw.eq(TbFloor::getUnitId, unitId)
|
||||
.orderByAsc(TbFloor::getFloorNumber);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user