guoyuji
2024-05-07 7858ac049443b7ac8799b1564a441900460df878
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
package com.example.erp.controller.userInfo;
 
import com.example.erp.common.Result;
import com.example.erp.controller.dto.UserDTO;
import com.example.erp.service.userInfo.UserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
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 java.util.Map;
 
@RestController
@RequestMapping("/userRole")
public class UserRoleController {
    private final UserRoleService userRoleService;
 
    public UserRoleController(UserRoleService userRoleService) {
        this.userRoleService = userRoleService;
    }
 
    @PostMapping("/updateUserRole")
    public Result updateUserRole(@RequestBody Map<String,Object> params) {
        return Result.seccess(userRoleService.updateUserRole(params));
    }
}