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
28
29
30
package com.whyc.controller;
 
import com.github.pagehelper.PageInfo;
import com.whyc.dto.Response;
import com.whyc.pojo.UserLog;
import com.whyc.service.UserLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
/**
 * 用户操作日志
 */
@RestController
@RequestMapping("userLog")
@Api(tags = "用户操作事件")
public class UserLogController {
 
    @Autowired
    private UserLogService service;
 
    @ApiOperation(value = "分页")
    @PostMapping("page")
    public Response<PageInfo<UserLog>> getPage(@RequestParam int pageNum, @RequestParam int pageSize, @RequestBody UserLog userLog){
        PageInfo<UserLog> pageInfo = service.getPage(pageNum,pageSize,userLog);
        return new Response<PageInfo<UserLog>>().set(1,pageInfo);
    }
 
}