package com.goafanti.business.controller; import com.goafanti.business.bo.InputRestrictProject; import com.goafanti.business.service.RestrictProjectService; import com.goafanti.common.bo.Result; import com.goafanti.common.controller.CertifyApiController; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; @RestController @RequestMapping("/api/restrict/Project") public class RestrictProjectController extends CertifyApiController { @Resource private RestrictProjectService restrictProjectService; /** * 添加限制项目 */ @RequestMapping(value = "/add", method = RequestMethod.POST) public Result add(InputRestrictProject in){ Result res = res(); return res.data(restrictProjectService.add(in)); } /** * 限制项目列表 * @param in * @return */ @RequestMapping(value = "/list", method = RequestMethod.GET) public Result list(InputRestrictProject in){ Result res = res(); if (in.getUid()==null){ return res.error(buildError("客户不能为空")); } return res.data(restrictProjectService.list(in)); } /** * 限定项目修改 * @param id 编号 * @param type 0=移除,1=转交 * @param takeAid 接受者 */ @RequestMapping(value ="/update",method = RequestMethod.POST) public Result update(Integer id,Integer type,String takeAid){ Result res = res(); return res.data(restrictProjectService.update(id,type,takeAid)); } }