|
@@ -10,6 +10,7 @@ import org.springframework.http.MediaType;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
@@ -62,9 +63,9 @@ public class ContractTemplateController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation("新增")
|
|
@ApiOperation("新增")
|
|
- @PostMapping(value = "/add", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
|
|
|
|
+ @PostMapping(value = "/add", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
@PreAuthorize("@pcs.hasPermissions('contractTemplate/add')")
|
|
@PreAuthorize("@pcs.hasPermissions('contractTemplate/add')")
|
|
- public Object add(ContractTemplate contractTemplate) {
|
|
|
|
|
|
+ public HttpResponseResult<Object> add(@RequestBody ContractTemplate contractTemplate) {
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
|
|
|
if(sysUser == null || sysUser.getId() == null){
|
|
if(sysUser == null || sysUser.getId() == null){
|
|
@@ -78,9 +79,9 @@ public class ContractTemplateController extends BaseController {
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation("更新")
|
|
@ApiOperation("更新")
|
|
- @PostMapping(value = "/update", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
|
|
|
|
+ @PostMapping(value = "/update", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
@PreAuthorize("@pcs.hasPermissions('contractTemplate/update')")
|
|
@PreAuthorize("@pcs.hasPermissions('contractTemplate/update')")
|
|
- public Object update(ContractTemplate tenantContractTemplate) {
|
|
|
|
|
|
+ public HttpResponseResult<Object> update(@RequestBody ContractTemplate tenantContractTemplate) {
|
|
contractTemplateService.update(tenantContractTemplate);
|
|
contractTemplateService.update(tenantContractTemplate);
|
|
return succeed();
|
|
return succeed();
|
|
}
|
|
}
|
|
@@ -88,7 +89,7 @@ public class ContractTemplateController extends BaseController {
|
|
@ApiOperation("启用协议")
|
|
@ApiOperation("启用协议")
|
|
@PostMapping(value = "/updateStatus", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
@PostMapping(value = "/updateStatus", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
|
@PreAuthorize("@pcs.hasPermissions('contractTemplate/updateStatus')")
|
|
@PreAuthorize("@pcs.hasPermissions('contractTemplate/updateStatus')")
|
|
- public Object enableContract(int id) {
|
|
|
|
|
|
+ public HttpResponseResult<Object> enableContract(int id) {
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
|
|
|
contractTemplateService.enableContract(id, sysUser.getId());
|
|
contractTemplateService.enableContract(id, sysUser.getId());
|