|
@@ -1,12 +1,14 @@
|
|
|
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 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;
|
|
@@ -67,6 +69,10 @@ public class ContractTemplateController extends BaseController {
|
|
|
if(sysUser == null || sysUser.getId() == null){
|
|
|
return failed(HttpStatus.FORBIDDEN, "请登录");
|
|
|
}
|
|
|
+
|
|
|
+ if(StringUtils.isBlank(contractTemplate.getType())){
|
|
|
+ contractTemplate.setType("BUY_ORDER");
|
|
|
+ }
|
|
|
|
|
|
contractTemplate.setStatus(false);
|
|
|
contractTemplate.setModifyBy(sysUser.getId());
|
|
@@ -77,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();
|
|
|
}
|
|
|
|