|
@@ -9,32 +9,36 @@ import com.css.simulation.resource.common.oauth.AuthorizationHolder;
|
|
|
import com.css.simulation.resource.feign.SceneService;
|
|
|
import com.css.simulation.resource.system.service.SceneImportService;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
-import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
|
-@Controller
|
|
|
+@RestController
|
|
|
@RequestMapping("/sceneImport")
|
|
|
@PreAuthorize("@AuthorityCheck.admin()")
|
|
|
public class SceneImportCtrl {
|
|
|
|
|
|
- @Autowired
|
|
|
- SceneImportService sceneImportService;
|
|
|
+ @Resource
|
|
|
+ private SceneImportService sceneImportService;
|
|
|
|
|
|
@Resource
|
|
|
- SceneService sceneService;
|
|
|
+ private SceneService sceneService;
|
|
|
+
|
|
|
+ @RequestMapping("/deleteTask")
|
|
|
+ public ResponseBodyVO<String> deleteTask(@RequestBody SceneImportPO sceneImportPO) {
|
|
|
+ String taskId = sceneImportPO.getId();
|
|
|
+ sceneImportService.deleteTask(taskId);
|
|
|
+ return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS);
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* 保存上传任务
|
|
|
*/
|
|
|
@RequestMapping("/saveTask")
|
|
|
- @ResponseBody
|
|
|
public ResponseBodyVO<SceneImportPO> saveTask(@RequestBody SceneImportPO po, HttpServletRequest request) {
|
|
|
if (ObjectUtil.isNull(po)) {
|
|
|
return new ResponseBodyVO<>(false, 500, "参数错误!", null);
|
|
@@ -62,7 +66,6 @@ public class SceneImportCtrl {
|
|
|
|
|
|
//查询列表
|
|
|
@RequestMapping("/getSceneImporPagetList")
|
|
|
- @ResponseBody
|
|
|
public ResponseBodyVO<PageInfo<SceneImportPO>> getSceneImporPagetList(@RequestBody SceneImportPageParam param) {
|
|
|
return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, sceneImportService.getSceneImporPagetList(param));
|
|
|
}
|