package com.zjrs.zwnw.portal.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.mohrss.leaf.core.framework.web.controller.AjaxResponse;
import com.zjrs.zwnw.portal.bpo.SysuserBPO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



/***
 * 用户管理Controller
 *
 * @author ylz-subh 2016-3-2
 *
 */
@Api("系统用户")
@RestController
@RequestMapping("/sysuser/sysuserController/")
public class SysuserController {
    /**
     * 日志
     */
    private static final Logger LOG = LoggerFactory.getLogger(SysuserController.class);
    /**
     * 用户管理BPO
     */
    @Autowired
    private SysuserBPO sysuserBPO;

    /***
     * 获取所有用户信息（userid，username）
     */
    @ApiOperation(value = "查询所有用户", notes = "查询所有用户的名称和id")
    @GetMapping("queryAllUserInfo")
    public AjaxResponse queryAllUserInfo() {
        AjaxResponse ajaxResponse = new AjaxResponse();
        ajaxResponse.setData("userinfo", sysuserBPO.queryAllUserInfo());
        return ajaxResponse;
    }

}
