提交 147db56c 作者: zhenjie

加盟修改

上级 58b18a0e
...@@ -28,7 +28,7 @@ public class UserApplyTagVO implements Serializable { ...@@ -28,7 +28,7 @@ public class UserApplyTagVO implements Serializable {
@NotNull(message = "加盟标签id不能为空", groups = { Insert.class }) @NotNull(message = "加盟标签id不能为空", groups = { Insert.class })
private Integer cooperationTagId; private Integer cooperationTagId;
@ApiModelProperty(value = "用户id") @ApiModelProperty(value = "用户id")
@NotNull(message = "加盟标签id不能为空", groups = { Insert.class }) //@NotNull(message = "加盟标签id不能为空", groups = { Insert.class })
private Integer userAccountId; private Integer userAccountId;
@ApiModelProperty(value = "申请人名称") @ApiModelProperty(value = "申请人名称")
@NotBlank(message = "申请人名称不能为空", groups = { Insert.class }) @NotBlank(message = "申请人名称不能为空", groups = { Insert.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 21:17 * @Date: 2023/5/17 21:17
...@@ -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("/cooperation/") @RequestMapping("/cooperation/")
@RestController @RestController
public class CooperationController { public class CooperationController extends BaseController{
@Autowired @Autowired
private CooperationService cooperationService; private CooperationService cooperationService;
...@@ -39,7 +41,9 @@ public class CooperationController { ...@@ -39,7 +41,9 @@ public class CooperationController {
@ApiOperation(value = "申请加盟") @ApiOperation(value = "申请加盟")
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) }) @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
@PostMapping("apply") @PostMapping("apply")
public ResultBody apply(@Validated(value = {Insert.class})@RequestBody UserApplyTagVO userApplyTagVO){ public ResultBody apply(@Validated(value = {Insert.class})@RequestBody UserApplyTagVO userApplyTagVO, HttpServletRequest request){
Integer userAccountId = this.getUserLoginInfoFromRedis(request).getUserAccountId();
userApplyTagVO.setUserAccountId(userAccountId);
return cooperationService.apply(userApplyTagVO); return cooperationService.apply(userApplyTagVO);
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论