package com.xiaopeng.account.controller;
|
|
import com.xiaopeng.account.service.ISysUserRoleService;
|
import com.xiaopeng.api.model.account.SysUserRole;
|
import com.xiaopeng.common.core.domain.R;
|
import com.xiaopeng.common.core.web.controller.BaseController;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import javax.annotation.Resource;
|
|
/**
|
* 用户和角色关联Controller
|
*
|
* @author xiaochen
|
* @date 2023-06-12
|
*/
|
@RestController
|
@RequestMapping("/logan/userRole")
|
public class SysUserRoleFeignController extends BaseController {
|
|
|
@Resource
|
private ISysUserRoleService sysUserRoleService;
|
|
|
/**
|
* 查询用户和角色关联
|
* @param userId
|
* @return
|
*/
|
@PostMapping(value = "/selectSysUserRoleByUserId")
|
public R<SysUserRole> selectSysUserRoleByUserId(@RequestParam("userId") Long userId) {
|
return R.ok(sysUserRoleService.selectSysUserRoleByUserId(userId));
|
}
|
}
|