| 
					
				 | 
			
			
				@@ -1,13 +1,15 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 package com.yonge.cooleshow.admin.controller; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.alibaba.cloud.commons.lang.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yonge.cooleshow.common.enums.ContractTemplateSourceEnum; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yonge.cooleshow.common.enums.ContractTemplateTypeEnum; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.yonge.toolset.base.util.StringUtil; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import io.swagger.annotations.Api; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import io.swagger.annotations.ApiImplicitParam; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import io.swagger.annotations.ApiOperation; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import io.swagger.annotations.ApiParam; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.http.HttpStatus; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.http.MediaType; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -81,8 +83,12 @@ public class ContractTemplateController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	@ApiOperation("更新") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	@PostMapping(value = "/update", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	@PreAuthorize("@pcs.hasPermissions('contractTemplate/update')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	public HttpResponseResult<Object> update(@RequestBody ContractTemplate tenantContractTemplate) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		contractTemplateService.update(tenantContractTemplate); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	public HttpResponseResult<Object> update(@RequestBody ContractTemplate contractTemplate) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if(StringUtils.isBlank(contractTemplate.getType())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        	contractTemplate.setType("BUY_ORDER"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		contractTemplateService.update(contractTemplate); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return succeed(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |