RestrictProjectController.java 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package com.goafanti.business.controller;
  2. import com.goafanti.business.bo.InputRestrictProject;
  3. import com.goafanti.business.service.RestrictProjectService;
  4. import com.goafanti.common.bo.Result;
  5. import com.goafanti.common.controller.CertifyApiController;
  6. import org.springframework.web.bind.annotation.RequestMapping;
  7. import org.springframework.web.bind.annotation.RequestMethod;
  8. import org.springframework.web.bind.annotation.RestController;
  9. import javax.annotation.Resource;
  10. @RestController
  11. @RequestMapping("/api/restrict/Project")
  12. public class RestrictProjectController extends CertifyApiController {
  13. @Resource
  14. private RestrictProjectService restrictProjectService;
  15. /**
  16. * 添加限制项目
  17. */
  18. @RequestMapping(value = "/add", method = RequestMethod.POST)
  19. public Result add(InputRestrictProject in){
  20. Result res = res();
  21. return res.data(restrictProjectService.add(in));
  22. }
  23. @RequestMapping(value = "/list", method = RequestMethod.GET)
  24. public Result list(InputRestrictProject in){
  25. Result res = res();
  26. if (in.getUid()==null){
  27. return res.error(buildError("客户不能为空"));
  28. }
  29. return res.data(restrictProjectService.list(in));
  30. }
  31. }