FolderController.java 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. package com.fdkankan.scene.controller;
  2. import com.fdkankan.common.controller.BaseController;
  3. import com.fdkankan.common.response.ResultData;
  4. import com.fdkankan.scene.service.IFolderService;
  5. import com.fdkankan.scene.vo.FolderParamVO;
  6. import java.util.List;
  7. import org.springframework.beans.BeanUtils;
  8. import org.springframework.beans.factory.annotation.Autowired;
  9. import org.springframework.validation.annotation.Validated;
  10. import org.springframework.web.bind.annotation.RequestBody;
  11. import org.springframework.web.bind.annotation.RequestMapping;
  12. import org.springframework.web.bind.annotation.RequestMethod;
  13. import org.springframework.web.bind.annotation.RestController;
  14. /**
  15. * <p>
  16. * 文件夹表 前端控制器
  17. * </p>
  18. *
  19. * @author dengsixing
  20. * @since 2021-12-24
  21. */
  22. @RestController
  23. @RequestMapping("/service/scene/folder")
  24. public class FolderController extends BaseController {
  25. @Autowired
  26. private IFolderService folderService;
  27. /**
  28. * <p>
  29. 新增文件夹
  30. * </p>
  31. * @author dengsixing
  32. * @date 2022/3/8
  33. * @param param
  34. * @return Result
  35. **/
  36. @RequestMapping(value = "/save", method = RequestMethod.POST)
  37. // @ApiImplicitParams({
  38. // @ApiImplicitParam(name = "name", value = "文件夹名称", dataType = "String"),
  39. // @ApiImplicitParam(name = "type", value = "文件夹类型,0我的场景,1协作场景", dataType = "String"),
  40. // @ApiImplicitParam(name = "parentId", value = "上层文件夹id", dataType = "String")})
  41. public ResultData save(@RequestBody @Validated FolderParamVO param){
  42. Long userId = this.getUserId();
  43. param.setUserId(userId);
  44. return folderService.save(param);
  45. }
  46. }