This commit is contained in:
xiangwb
2017-11-15 16:53:11 +08:00
parent 12aecbea05
commit e4d985c1b9
5 changed files with 590 additions and 0 deletions
@@ -0,0 +1,38 @@
package com.xwbing.controller.sys;
import com.alibaba.fastjson.JSONObject;
import com.xwbing.annotation.LogInfo;
import com.xwbing.entity.SysUserLoginInOut;
import com.xwbing.service.sys.SysUserLoginInOutService;
import com.xwbing.util.JSONObjResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
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;
import java.util.List;
/**
* 项目名称: boot-module-demo
* 创建时间: 2017/11/7 11:16
* 作者: xiangwb
* 说明: 用户登录登出控制层
*/
@Api(tags = "inoutApi", description = "登陆登出相关接口")
@RestController
@RequestMapping("/inout/")
public class SysUserLoginInOutControl {
@Resource
private SysUserLoginInOutService inOutService;
@LogInfo("获取登录或登出信息")
@GetMapping("listByType")
@ApiOperation(value = "获取登录或登出信息")
public JSONObject listByType(@RequestParam int inout) {
List<SysUserLoginInOut> sysUserLoginInOuts = inOutService.listByType(inout);
return JSONObjResult.toJSONObj(sysUserLoginInOuts, true, "获取列表成功");
}
}