123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- package com.fdkankan.scene.controller;
- import com.fdkankan.common.constant.SceneInfoReqType;
- import com.fdkankan.scene.annotation.CheckPermit;
- import com.fdkankan.scene.service.ISceneService;
- import com.fdkankan.web.response.ResultData;
- import com.fdkankan.scene.service.ISceneEditInfoService;
- import com.fdkankan.scene.service.IScenePlusService;
- import com.fdkankan.scene.vo.BaseSceneParamVO;
- import com.fdkankan.scene.vo.SceneCheckKeyParamVO;
- import com.fdkankan.scene.vo.SceneInfoParamVO;
- import com.fdkankan.scene.vo.SceneInfoVO;
- import com.fdkankan.web.controller.BaseController;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.validation.annotation.Validated;
- import org.springframework.web.bind.annotation.*;
- import org.springframework.web.multipart.MultipartFile;
- /**
- * <p>
- * 场景表 前端控制器
- * </p>
- *
- * @author dengsixing
- * @since 2021-12-23
- */
- @RestController
- @RequestMapping("/service/scene")
- public class SceneController extends BaseController {
- @Autowired
- private ISceneEditInfoService sceneEditInfoService;
- @Autowired
- private IScenePlusService scenePlusService;
- @Autowired
- private ISceneService sceneService;
- /**
- * <p>
- 获取场景详情
- * </p>
- * @author dengsixing
- * @date 2022/8/1
- * @param param
- * @return com.fdkankan.scene.vo.SceneInfoVO
- **/
- @GetMapping(value = "/getInfo")
- public SceneInfoVO getInfo(@Validated SceneInfoParamVO param) throws Exception{
- param.setReqType(SceneInfoReqType.VIEW.code());
- return sceneEditInfoService.getSceneInfo(param, request);
- }
- /**
- * <p>
- 根据场景密码打开场景
- * </p>
- * @author dengsixing
- * @date 2022/8/1
- * @param param
- * @return com.fdkankan.web.response.ResultData
- **/
- @PostMapping(value = "/check/key")
- public ResultData checkKey(@RequestBody @Validated SceneCheckKeyParamVO param) throws Exception {
- return sceneEditInfoService.checkKey(param);
- }
- /**
- * <p>
- 获取数据对接下载信息
- * </p>
- * @author dengsixing
- * @date 2022/8/1
- * @return com.fdkankan.web.response.ResultData
- **/
- @GetMapping(value = "/downLoadZSData")
- public ResultData downLoadZSData(String sceneNum) throws Exception{
- return scenePlusService.downLoadZSData(sceneNum);
- }
- /**
- * 上传人体抠图原图
- * @param num
- * @param file
- * @return
- * @throws Exception
- */
- @PostMapping(value = "/uploadBodySegment")
- public ResultData uploadBodySegment(@RequestParam("file") MultipartFile file,
- @RequestParam(value = "rotate", required = false) Integer rotate) throws Exception {
- return sceneService.uploadBodySegment(file, rotate);
- }
- /**
- * 获取人体抠图提取状态
- * @return ResultData
- * @throws Exception
- */
- @PostMapping(value = "/getBodySegmentStatus")
- public ResultData getBodySegmentStatus(@RequestParam(value = "serialNum") String uuid) throws Exception {
- return sceneService.getBodySegmentStatus(uuid);
- }
- }
|