|
@@ -11,7 +11,6 @@ import com.ruoyi.system.service.IBomanReservatService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
-
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -23,31 +22,45 @@ import java.util.List;
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping("/system/reservat")
|
|
|
-public class BomanReservatController extends BaseController
|
|
|
-{
|
|
|
+public class BomanReservatController extends BaseController {
|
|
|
@Autowired
|
|
|
private IBomanReservatService bomanReservatService;
|
|
|
|
|
|
-/**
|
|
|
- * 查询预约列表
|
|
|
- */
|
|
|
-@PreAuthorize("@ss.hasPermi('system:reservat:list')")
|
|
|
-@GetMapping("/list")
|
|
|
- public TableDataInfo list(BomanReservat bomanReservat)
|
|
|
- {
|
|
|
+ /**
|
|
|
+ * 查询预约列表
|
|
|
+ */
|
|
|
+ @PreAuthorize("@ss.hasPermi('system:reservat:list')")
|
|
|
+ @GetMapping("/list")
|
|
|
+ public TableDataInfo list(BomanReservat bomanReservat) {
|
|
|
startPage();
|
|
|
List<BomanReservat> list = bomanReservatService.selectBomanReservatList(bomanReservat);
|
|
|
return getDataTable(list);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 查询预约列表
|
|
|
+ */
|
|
|
+ @GetMapping("/listNoPage")
|
|
|
+ public TableDataInfo listNoPage(BomanReservat bomanReservat) {
|
|
|
+ List<BomanReservat> list = bomanReservatService.selectBomanReservatList(bomanReservat);
|
|
|
+ return getDataTable(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取预约详细信息
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/detail/{reservatId}")
|
|
|
+ public AjaxResult getInfoDetail(@PathVariable("reservatId") Long reservatId) {
|
|
|
+ return success(bomanReservatService.selectBomanReservatByReservatId(reservatId));
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 导出预约列表
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('system:reservat:export')")
|
|
|
@Log(title = "预约", businessType = BusinessType.EXPORT)
|
|
|
@PostMapping("/export")
|
|
|
- public void export(HttpServletResponse response, BomanReservat bomanReservat)
|
|
|
- {
|
|
|
+ public void export(HttpServletResponse response, BomanReservat bomanReservat) {
|
|
|
List<BomanReservat> list = bomanReservatService.selectBomanReservatList(bomanReservat);
|
|
|
ExcelUtil<BomanReservat> util = new ExcelUtil<BomanReservat>(BomanReservat.class);
|
|
|
util.exportExcel(response, list, "预约数据");
|
|
@@ -58,19 +71,17 @@ public class BomanReservatController extends BaseController
|
|
|
*/
|
|
|
@PreAuthorize("@ss.hasPermi('system:reservat:query')")
|
|
|
@GetMapping(value = "/{reservatId}")
|
|
|
- public AjaxResult getInfo(@PathVariable("reservatId") Long reservatId)
|
|
|
- {
|
|
|
+ public AjaxResult getInfo(@PathVariable("reservatId") Long reservatId) {
|
|
|
return success(bomanReservatService.selectBomanReservatByReservatId(reservatId));
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 新增预约
|
|
|
*/
|
|
|
- @PreAuthorize("@ss.hasPermi('system:reservat:add')")
|
|
|
+ //@PreAuthorize("@ss.hasPermi('system:reservat:add')")
|
|
|
@Log(title = "预约", businessType = BusinessType.INSERT)
|
|
|
@PostMapping("/add")
|
|
|
- public AjaxResult add(@RequestBody BomanReservat bomanReservat)
|
|
|
- {
|
|
|
+ public AjaxResult add(@RequestBody BomanReservat bomanReservat) {
|
|
|
return toAjax(bomanReservatService.insertBomanReservat(bomanReservat));
|
|
|
}
|
|
|
|
|
@@ -80,8 +91,7 @@ public class BomanReservatController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('system:reservat:edit')")
|
|
|
@Log(title = "预约", businessType = BusinessType.UPDATE)
|
|
|
@PostMapping("/put")
|
|
|
- public AjaxResult edit(@RequestBody BomanReservat bomanReservat)
|
|
|
- {
|
|
|
+ public AjaxResult edit(@RequestBody BomanReservat bomanReservat) {
|
|
|
return toAjax(bomanReservatService.updateBomanReservat(bomanReservat));
|
|
|
}
|
|
|
|
|
@@ -91,8 +101,7 @@ public class BomanReservatController extends BaseController
|
|
|
@PreAuthorize("@ss.hasPermi('system:reservat:remove')")
|
|
|
@Log(title = "预约", businessType = BusinessType.DELETE)
|
|
|
@GetMapping("/delete/{reservatIds}")
|
|
|
- public AjaxResult remove(@PathVariable Long[] reservatIds)
|
|
|
- {
|
|
|
+ public AjaxResult remove(@PathVariable Long[] reservatIds) {
|
|
|
return toAjax(bomanReservatService.deleteBomanReservatByReservatIds(reservatIds));
|
|
|
}
|
|
|
|