|  | @@ -5,6 +5,7 @@ import com.ym.mec.biz.dal.page.StudentCompetitionQueryInfo;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.service.StudentCompetitionService;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.controller.BaseController;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.entity.HttpResponseResult;
 | 
	
		
			
				|  |  | +import com.ym.mec.common.exception.BizException;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.page.PageInfo;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.Api;
 | 
	
		
			
				|  |  |  import io.swagger.annotations.ApiOperation;
 | 
	
	
		
			
				|  | @@ -15,6 +16,8 @@ import org.springframework.web.bind.annotation.RequestBody;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.RequestMapping;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.RestController;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import java.util.Objects;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  /**
 | 
	
		
			
				|  |  |   * @Author Joburgess
 | 
	
		
			
				|  |  |   * @Date 2020.11.10
 | 
	
	
		
			
				|  | @@ -37,7 +40,10 @@ public class StudentCompetitionController extends BaseController {
 | 
	
		
			
				|  |  |      @PostMapping("/update")
 | 
	
		
			
				|  |  |      @PreAuthorize("@pcs.hasPermissions('studentCompetition/update')")
 | 
	
		
			
				|  |  |      public HttpResponseResult update(@RequestBody StudentCompetition studentCompetition){
 | 
	
		
			
				|  |  | -        studentCompetitionService.update(studentCompetition);
 | 
	
		
			
				|  |  | +        if(Objects.isNull(studentCompetition.getId())){
 | 
	
		
			
				|  |  | +            throw new BizException("请指定参赛作品");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        studentCompetitionService.updateCompetition(studentCompetition);
 | 
	
		
			
				|  |  |          return succeed();
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 |