提交 1d5608ae 作者: zhenjie 提交者: 余乾开

企业认证修改

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