package com.bonus.system.controller;

import com.bonus.common.core.domain.R;
import com.bonus.common.core.utils.StringUtils;
import com.bonus.common.security.annotation.InnerAuth;
import com.bonus.system.api.domain.SysDept;
import com.bonus.system.api.domain.SysUser;
import com.bonus.system.api.model.LoginUser;
import com.bonus.system.api.model.SbdUser;
import com.bonus.system.service.ISbdUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.PostConstruct;
import java.util.Set;


/**
 * 送变电用户信息
 * @author 黑子
 */
@RestController
@RequestMapping("/sbdUser")
public class SbdUserController {

    @Autowired
    private ISbdUserService service;

    /**
     *  依据登录名查询用户角色
     *  test shenyd6214/mengj7012
     */
    @InnerAuth
    @GetMapping("/getInfo/{username}")
    public R<SbdUser> getInfo(@PathVariable("username") String username) {
        SbdUser user=service.getUserInfo(username);
        return R.ok(user);
    }




}
