content: package com.company.project.controller;
  
  import com.company.project.common.aop.annotation.LogAnnotation;
  import com.company.project.service.UserRoleService;
  import com.company.project.vo.req.UserRoleOperationReqVO;
  import io.swagger.annotations.Api;
  import io.swagger.annotations.ApiOperation;
  import org.springframework.web.bind.annotation.PostMapping;
  import org.springframework.web.bind.annotation.RequestBody;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RestController;
  
  import javax.annotation.Resource;
  import javax.validation.Valid;
  
  /**
   * 用户和角色关联
   *
   * @author wenbin
   * @version V1.0
   * @date 2020年3月18日
   */
  @RequestMapping("/sys")
  @RestController
  @Api(tags = "组织管理-用户和角色关联接口")
  public class UserRoleController {
      @Resource
      private UserRoleService userRoleService;
  
      @PostMapping("/user/role")
      @ApiOperation(value = "修改或者新增用户角色接口")
      @LogAnnotation(title = "用户和角色关联接口", action = "修改或者新增用户角色")
      public void operationUserRole(@RequestBody @Valid UserRoleOperationReqVO vo) {
          userRoleService.addUserRoleInfo(vo);
      }
  }
  