package com.jkcredit.invoice.controller.user;

import com.jkcredit.invoice.annotation.LoginRequired;
import com.jkcredit.invoice.service.user.RoleService;
import com.jkcredit.invoice.util.RespR;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: sunzhaoning
 * @create: 2019-05-29 17:26
 * @version: V1.0
 **/
@Api(tags = "用户角色")
@RestController
@RequestMapping("/role")
public class RoleController {

    @Autowired
    private RoleService roleService;

    @LoginRequired
    @PostMapping(value = "/list")
    @ApiOperation(value="角色列表", notes="角色列表")
    public RespR roleList(){
        return new RespR<>(roleService.list());
    }
}
