Search in sources :

Example 26 with PageInfo

use of com.github.pagehelper.PageInfo in project xmall by Exrick.

the class MemberServiceImpl method getMemberList.

@Override
public DataTablesResult getMemberList(int draw, int start, int length, String search, String minDate, String maxDate, String orderCol, String orderDir) {
    DataTablesResult result = new DataTablesResult();
    try {
        // 分页
        PageHelper.startPage(start / length + 1, length);
        List<TbMember> list = tbMemberMapper.selectByMemberInfo("%" + search + "%", minDate, maxDate, orderCol, orderDir);
        PageInfo<TbMember> pageInfo = new PageInfo<>(list);
        for (TbMember tbMember : list) {
            tbMember.setPassword("");
        }
        result.setRecordsFiltered((int) pageInfo.getTotal());
        result.setRecordsTotal(getMemberCount().getRecordsTotal());
        result.setDraw(draw);
        result.setData(list);
    } catch (Exception e) {
        throw new XmallException("加载用户列表失败");
    }
    return result;
}
Also used : PageInfo(com.github.pagehelper.PageInfo) TbMember(cn.exrick.manager.pojo.TbMember) DataTablesResult(cn.exrick.common.pojo.DataTablesResult) XmallException(cn.exrick.common.exception.XmallException) XmallException(cn.exrick.common.exception.XmallException)

Example 27 with PageInfo

use of com.github.pagehelper.PageInfo in project xmall by Exrick.

the class SystemServiceImpl method getLogList.

@Override
public DataTablesResult getLogList(int draw, int start, int length, String search, String orderCol, String orderDir) {
    DataTablesResult result = new DataTablesResult();
    // 分页
    PageHelper.startPage(start / length + 1, length);
    List<TbLog> list = tbLogMapper.selectByMulti("%" + search + "%", orderCol, orderDir);
    PageInfo<TbLog> pageInfo = new PageInfo<>(list);
    result.setRecordsFiltered((int) pageInfo.getTotal());
    result.setRecordsTotal(Math.toIntExact(countLog()));
    result.setDraw(draw);
    result.setData(list);
    return result;
}
Also used : PageInfo(com.github.pagehelper.PageInfo) DataTablesResult(cn.exrick.common.pojo.DataTablesResult)

Example 28 with PageInfo

use of com.github.pagehelper.PageInfo in project paascloud-master by paascloud.

the class UacActionMainController method queryUacActionListWithPage.

/**
 * 分页查询角色信息.
 *
 * @param action the action
 *
 * @return the wrapper
 */
@PostMapping(value = "/queryListWithPage")
@ApiOperation(httpMethod = "POST", value = "查询角色列表")
public Wrapper queryUacActionListWithPage(@ApiParam(name = "action", value = "角色信息") @RequestBody ActionMainQueryDto action) {
    logger.info("查询角色列表actionQuery={}", action);
    PageInfo pageInfo = uacActionService.queryActionListWithPage(action);
    return WrapMapper.ok(pageInfo);
}
Also used : PageInfo(com.github.pagehelper.PageInfo) ApiOperation(io.swagger.annotations.ApiOperation)

Example 29 with PageInfo

use of com.github.pagehelper.PageInfo in project paascloud-master by paascloud.

the class UacTokenMainController method queryUacActionListWithPage.

/**
 * 分页查询角色信息.
 *
 * @param token the token
 *
 * @return the wrapper
 */
@PostMapping(value = "/queryListWithPage")
@ApiOperation(httpMethod = "POST", value = "查询在线用户列表")
public Wrapper queryUacActionListWithPage(@ApiParam(name = "token") @RequestBody TokenMainQueryDto token) {
    logger.info("查询在线用户列表. token={}", token);
    PageInfo pageInfo = uacUserTokenService.listTokenWithPage(token);
    return WrapMapper.ok(pageInfo);
}
Also used : PageInfo(com.github.pagehelper.PageInfo) PostMapping(org.springframework.web.bind.annotation.PostMapping) ApiOperation(io.swagger.annotations.ApiOperation)

Example 30 with PageInfo

use of com.github.pagehelper.PageInfo in project paascloud-master by paascloud.

the class OmcOrderController method queryOrderListWithPage.

@PostMapping("queryOrderListWithPage")
@ApiOperation(httpMethod = "POST", value = "查询用户订单列表")
public Wrapper queryOrderListWithPage(@RequestBody OrderPageQuery orderPageQuery) {
    logger.info("queryOrderListWithPage - 查询订单集合. orderPageQuery={}", orderPageQuery);
    PageInfo pageInfo = omcOrderService.queryOrderListWithPage(orderPageQuery);
    return WrapMapper.ok(pageInfo);
}
Also used : PageInfo(com.github.pagehelper.PageInfo) ApiOperation(io.swagger.annotations.ApiOperation)

Aggregations

PageInfo (com.github.pagehelper.PageInfo)273 PostMapping (org.springframework.web.bind.annotation.PostMapping)96 EUDataGridResult (com.megagao.production.ssm.domain.customize.EUDataGridResult)90 Test (org.junit.Test)21 UserMapper (com.github.pagehelper.mapper.UserMapper)17 User (com.github.pagehelper.model.User)17 SqlSession (org.apache.ibatis.session.SqlSession)17 ApiOperation (io.swagger.annotations.ApiOperation)14 TaskRecordDetail (com.eservice.api.model.task_record.TaskRecordDetail)11 Condition (tk.mybatis.mapper.entity.Condition)9 DataTablesResult (cn.exrick.common.pojo.DataTablesResult)7 ArrayList (java.util.ArrayList)7 Criteria (tk.mybatis.mapper.entity.Example.Criteria)6 TaskRecord (com.eservice.api.model.task_record.TaskRecord)4 Product (com.megagao.production.ssm.domain.Product)4 Task (com.megagao.production.ssm.domain.Task)4 ManufactureVO (com.megagao.production.ssm.domain.vo.ManufactureVO)4 WorkVO (com.megagao.production.ssm.domain.vo.WorkVO)4 MachineInfo (com.eservice.api.model.machine.MachineInfo)3 User (com.eservice.api.model.user.User)3