提交 e1f2656b 作者: zhenjie

单位管理修改

上级 b24293ce
...@@ -31,7 +31,6 @@ public class CompanyInfoVO implements Serializable { ...@@ -31,7 +31,6 @@ public class CompanyInfoVO implements Serializable {
@NotNull(message = "单位名称不能为空", groups = { Insert.class }) @NotNull(message = "单位名称不能为空", groups = { Insert.class })
private String companyName; private String companyName;
@ApiModelProperty(value = "单位全称", example = "浙江科比特创新科技有限公司") @ApiModelProperty(value = "单位全称", example = "浙江科比特创新科技有限公司")
@NotNull(message = "单位全称不能为空", groups = { Insert.class })
private String fullName; private String fullName;
@ApiModelProperty(value = "省份名称", example = "广东省") @ApiModelProperty(value = "省份名称", example = "广东省")
@NotNull(message = "省份名称不能为空", groups = { Insert.class }) @NotNull(message = "省份名称不能为空", groups = { Insert.class })
......
...@@ -27,7 +27,7 @@ public class PmsClient { ...@@ -27,7 +27,7 @@ public class PmsClient {
HttpHeaders headers = new HttpHeaders(); HttpHeaders headers = new HttpHeaders();
headers.add("token", token); headers.add("token", token);
HttpEntity<String> entity = new HttpEntity<>(null, headers); HttpEntity<String> entity = new HttpEntity<>(null, headers);
ResponseEntity<ResultBody> responseEntity = restTemplate.exchange(pmsAppUri+"/pms/backstage/work/queryWorkServiceCount" + "?id=" + id, HttpMethod.GET, entity, ResultBody.class); ResponseEntity<ResultBody> responseEntity = restTemplate.exchange(pmsAppUri+"/pms/backstage/work/queryWorkServiceCount" + "?companyId=" + id, HttpMethod.GET, entity, ResultBody.class);
ResultBody body = responseEntity.getBody(); ResultBody body = responseEntity.getBody();
if (body.getCode().equals(ResultEnum.SUCCESS.getResultCode())){ if (body.getCode().equals(ResultEnum.SUCCESS.getResultCode())){
Integer count = (Integer) body.getResult(); Integer count = (Integer) body.getResult();
......
package com.mmc.iuav.user.controller; package com.mmc.iuav.user.controller;
import com.mmc.iuav.group.Insert;
import com.mmc.iuav.response.ResultBody; import com.mmc.iuav.response.ResultBody;
import com.mmc.iuav.user.model.qo.CompanyInfoQO; import com.mmc.iuav.user.model.qo.CompanyInfoQO;
import com.mmc.iuav.user.model.vo.CompanyInfoVO; import com.mmc.iuav.user.model.vo.CompanyInfoVO;
...@@ -9,6 +10,7 @@ import io.swagger.annotations.ApiOperation; ...@@ -9,6 +10,7 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse; import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses; import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
/** /**
...@@ -25,7 +27,7 @@ public class CompanyController extends BaseController{ ...@@ -25,7 +27,7 @@ public class CompanyController extends BaseController{
@ApiOperation(value = "新增") @ApiOperation(value = "新增")
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) }) @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
@PostMapping("add") @PostMapping("add")
public ResultBody add(@RequestBody CompanyInfoVO companyInfo){ public ResultBody add(@Validated(Insert.class) @RequestBody CompanyInfoVO companyInfo){
return companyService.addCompanyInfo(companyInfo); return companyService.addCompanyInfo(companyInfo);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论