提交 6cf51690 作者: zhenjie

企业认证修改

上级 3669bf26
...@@ -25,8 +25,8 @@ public class CompanyAuthVO implements Serializable { ...@@ -25,8 +25,8 @@ public class CompanyAuthVO implements Serializable {
@ApiModelProperty(value = "id") @ApiModelProperty(value = "id")
@NotNull(message = "id创建修改不能为空", groups = { Update.class }) @NotNull(message = "id创建修改不能为空", groups = { Update.class })
private Integer id; private Integer id;
@ApiModelProperty(value = "用户id") @ApiModelProperty(value = "用户id", hidden = true)
@NotNull(message = "用户id不能为空", groups = { Insert.class, Update.class}) //@NotNull(message = "用户id不能为空", groups = { Insert.class, Update.class})
private Integer userAccountId; private Integer userAccountId;
@ApiModelProperty(value = "企业名称") @ApiModelProperty(value = "企业名称")
@NotBlank(message = "企业名称", groups = { Insert.class, Update.class}) @NotBlank(message = "企业名称", groups = { Insert.class, Update.class})
......
...@@ -11,6 +11,8 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -11,6 +11,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
/** /**
* @author: zj * @author: zj
* @Date: 2023/5/17 13:33 * @Date: 2023/5/17 13:33
...@@ -18,7 +20,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -18,7 +20,7 @@ import org.springframework.web.bind.annotation.*;
@Api(tags = "企业认证相关") @Api(tags = "企业认证相关")
@RequestMapping("/company-auth/") @RequestMapping("/company-auth/")
@RestController @RestController
public class CompanyAuthController { public class CompanyAuthController extends BaseController{
@Autowired @Autowired
private CompanyAuthService companyAuthService; private CompanyAuthService companyAuthService;
...@@ -26,7 +28,9 @@ public class CompanyAuthController { ...@@ -26,7 +28,9 @@ public class CompanyAuthController {
@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(@Validated(value = {Insert.class})@RequestBody CompanyAuthVO companyAuthVO){ public ResultBody add(@Validated(value = {Insert.class})@RequestBody CompanyAuthVO companyAuthVO, HttpServletRequest request){
Integer userAccountId = this.getUserLoginInfoFromRedis(request).getUserAccountId();
companyAuthVO.setUserAccountId(userAccountId);
return companyAuthService.add(companyAuthVO); return companyAuthService.add(companyAuthVO);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论