package com.gyee.frame.service.impl.ticket;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gyee.frame.model.ticket.Wfassignment;
import com.gyee.frame.mapper.ticket.WfassignmentMapper;
import com.gyee.frame.service.ticket.WfassignmentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author chenmh
 * @since 2020-06-02
 */
@Service
public class WfassignmentServiceImpl extends ServiceImpl<WfassignmentMapper, Wfassignment> implements WfassignmentService {

    @Override
    public IPage<Wfassignment> selectPage(long pageNum) {
        QueryWrapper<Wfassignment> wrapper = new QueryWrapper();
        wrapper.eq("ASSIGNSTATUS", "活动");
        wrapper.eq("APP", "WINDELEC");
        wrapper.orderByDesc("ID");

        Page<Wfassignment> page = new Page<>(pageNum, 15);
        IPage<Wfassignment> iPage = baseMapper.selectPage(page, wrapper);

        return iPage;
    }
}
