提交 147db56c 作者: zhenjie

加盟修改

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