49 lines
1.3 KiB
Java
49 lines
1.3 KiB
Java
package com.etl.cleaning.controller;
|
|
|
|
import com.etl.cleaning.domian.pojo.DataPlace;
|
|
import com.etl.cleaning.domian.request.PlaceRequest;
|
|
import com.etl.cleaning.service.PlaceService;
|
|
import com.etl.common.result.Result;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
/**
|
|
* 数据源管理
|
|
*/
|
|
@RestController
|
|
@RequestMapping("/place")
|
|
public class PlaceController {
|
|
private final PlaceService placeService;
|
|
|
|
public PlaceController(PlaceService placeService) {
|
|
this.placeService = placeService;
|
|
}
|
|
|
|
/**
|
|
* 数据源管理列表展示
|
|
* @param placeRequest
|
|
* @return
|
|
*/
|
|
@PostMapping("/showPlacePage")
|
|
public Result showPlacePage(@RequestBody PlaceRequest placeRequest){
|
|
Map<String, Object> stringObjectMap = placeService.showPlacePage(placeRequest);
|
|
return Result.success(stringObjectMap);
|
|
}
|
|
|
|
/**
|
|
* 批量删除
|
|
* @param ids
|
|
* @return
|
|
*/
|
|
@PostMapping("/delAdd")
|
|
public Result delAll(@RequestBody List<Long> ids){
|
|
boolean b = placeService.removeBatchByIds(ids);
|
|
return Result.success(b);
|
|
}
|
|
}
|