liujie
2026-05-12 76b3532393aa98c2daaeb67caeefa2ab9556e866
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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));
    }
}