场所出入登记

pg_adapter
dshclm 8 months ago
parent b9df9c72e1
commit f466bb840d

@ -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 {

@ -55,7 +55,6 @@
method: 'POST',
dataType: 'json'
}).done(function(data) {
// 假设返回的数据格式为 { data: [{ id: 1, placeName: '...'}, ...] }
data.data.forEach(function(item) {
placeCache[item.id] = item.placeName;
});

Loading…
Cancel
Save