package org.jeecg.modules.newsys.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.newsys.entity.SysUser;
import org.jeecg.modules.newsys.service.SysNewsUserService;
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 javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/newsys/")
@Slf4j
public class SysNewsUserController {

    @Resource
    private SysNewsUserService service;

    @GetMapping("page")
    public void page(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
                     @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
                     HttpServletRequest req){
        Page<SysUser> page = new Page<SysUser>(pageNo, pageSize);
        QueryWrapper<SysUser> queryWrapper = new QueryWrapper<>();
        Page<SysUser> res = service.selectListPage(queryWrapper,page);
    }
}
