Commit 8eaa3406 by 吕明尚

增加根据套餐id查房间id集合

parent f0f22a27
...@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -16,6 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
import share.common.annotation.Log; import share.common.annotation.Log;
import share.common.core.controller.BaseController; import share.common.core.controller.BaseController;
import share.common.core.domain.AjaxResult; import share.common.core.domain.AjaxResult;
import share.common.core.domain.R;
import share.common.enums.BusinessType; import share.common.enums.BusinessType;
import share.system.domain.SRoomPack; import share.system.domain.SRoomPack;
import share.system.service.IRoomPackService; import share.system.service.IRoomPackService;
...@@ -95,4 +96,13 @@ public class RoomPackController extends BaseController { ...@@ -95,4 +96,13 @@ public class RoomPackController extends BaseController {
public AjaxResult remove(@PathVariable Long[] ids) { public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(roomPackService.deleteRoomPackByIds(ids)); return toAjax(roomPackService.deleteRoomPackByIds(ids));
} }
/**
* 获取包房套餐关系详细信息
*/
@PreAuthorize("@ss.hasPermi('system:pack:query')")
@GetMapping(value = "/getPackId/{id}")
public R<List<SRoomPack>> getPackId(@PathVariable("id") Long id) {
return R.ok(roomPackService.selectRoomPackByPackId(id));
}
} }
...@@ -63,4 +63,6 @@ public interface IRoomPackService extends IService<SRoomPack> { ...@@ -63,4 +63,6 @@ public interface IRoomPackService extends IService<SRoomPack> {
List<Long> selectPackListByRoomId(Long id); List<Long> selectPackListByRoomId(Long id);
int deleteRoomPackByRoomId(Long id); int deleteRoomPackByRoomId(Long id);
List<SRoomPack> selectRoomPackByPackId(Long id);
} }
...@@ -101,4 +101,12 @@ public class RoomPackServiceImpl extends ServiceImpl<RoomPackMapper, SRoomPack> ...@@ -101,4 +101,12 @@ public class RoomPackServiceImpl extends ServiceImpl<RoomPackMapper, SRoomPack>
queryWrapper.eq(SRoomPack::getRoomId, id); queryWrapper.eq(SRoomPack::getRoomId, id);
return roomPackMapper.delete(queryWrapper); return roomPackMapper.delete(queryWrapper);
} }
@Override
public List<SRoomPack> selectRoomPackByPackId(Long id) {
LambdaQueryWrapper<SRoomPack> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(SRoomPack::getPackId, id);
return roomPackMapper.selectList(queryWrapper);
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment