@@ -51,5 +51,5 @@ public interface HouseAPI {
@GetMapping("/displayBar")
@ApiOperation(value = "房型下拉列表", notes = "房型下拉列表", httpMethod = "GET")
- CommonResult displayBar();
+ CommonResult displayBar(Integer type);
}
@@ -498,8 +498,8 @@ public class HouseController implements HouseAPI {
@Override
- public CommonResult displayBar() {
- List<HouseDisplayBarVo> list = houseService.displayBar();
+ public CommonResult displayBar(Integer type) {
+ List<HouseDisplayBarVo> list = houseService.displayBar(type);
return CommonResult.ok(list);
@@ -30,6 +30,6 @@ public interface HouseMapper extends BaseMapper<House> {
List<String> group();
- List<HouseDisplayBarVo> displayBar();
+ List<HouseDisplayBarVo> displayBar(@Param("type") Integer type);
@@ -32,5 +32,5 @@ public interface HouseService extends IService<House> {
House getHouseName(String houseName,Integer roomType);
+ List<HouseDisplayBarVo> displayBar(Integer type);
@@ -65,8 +65,8 @@ public class HouseServiceImpl extends ServiceImpl<HouseMapper, House> implements
- public List<HouseDisplayBarVo> displayBar() {
- return houseMapper.displayBar();
+ public List<HouseDisplayBarVo> displayBar(Integer type) {
+ return houseMapper.displayBar(type);
@@ -77,6 +77,9 @@
house
WHERE
deleted=0
+ <if test="type != null and type != ''">
+ and room_type=#{type}
+ </if>
</select>