|
|
|
@ -122,20 +122,13 @@ public class TdPlaceController extends BaseController {
|
|
|
|
|
* 查询所有场所
|
|
|
|
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
|
|
|
|
*/
|
|
|
|
|
// @PostMapping("/getList")
|
|
|
|
|
// @ResponseBody
|
|
|
|
|
// public AjaxResult getList() {
|
|
|
|
|
// return AjaxResult.success(placeManager.selectList());
|
|
|
|
|
// }
|
|
|
|
|
@PostMapping("/getList")
|
|
|
|
|
@ResponseBody
|
|
|
|
|
public AjaxResult getList(@RequestParam(value = "id", required = false) Long id) {
|
|
|
|
|
if (id == null) {
|
|
|
|
|
// 如果 id 为空,则查询所有数据
|
|
|
|
|
public AjaxResult getList(@RequestParam(value = "placeId", required = false) Long placeId) {
|
|
|
|
|
if (placeId == null) {
|
|
|
|
|
return AjaxResult.success(placeManager.selectList());
|
|
|
|
|
} else {
|
|
|
|
|
// 否则,根据 id 查询单条数据
|
|
|
|
|
TdPlace place = placeManager.selectById(id);
|
|
|
|
|
TdPlace place = placeManager.selectById(placeId);
|
|
|
|
|
if (place != null) {
|
|
|
|
|
return AjaxResult.success(place);
|
|
|
|
|
} else {
|
|
|
|
|