|
|
@@ -25,6 +25,7 @@ import com.ruoyi.project.service.ProjectTaskService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
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;
|
|
|
|
|
|
@@ -84,10 +85,8 @@ public class ProjectTaskController extends BaseController {
|
|
|
*/
|
|
|
@PostMapping("/addStaff")
|
|
|
@ApiOperation("新增项目成员")
|
|
|
- public AjaxResult addStaff( @RequestBody ProjectStaff in){
|
|
|
- if (in.getAid()== null){
|
|
|
- return error("项目成员不能为空");
|
|
|
- }
|
|
|
+ public AjaxResult addStaff(@Validated @RequestBody ProjectStaff in){
|
|
|
+
|
|
|
return projectStaffService.addStaff(in);
|
|
|
}
|
|
|
|