package com.app.ydl.marketing.service;

import com.app.framework.core.support.service.impl.CrudBaseServiceSupport;
import com.app.framework.core.support.view.grid.Paging;
import com.app.ydl.marketing.dao.LandingChannelWxmpAccessRecordDao;
import com.app.ydl.marketing.model.LandingChannelWxmpAccessRecord;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class LandingChannelWxmpAccessRecordService extends CrudBaseServiceSupport<LandingChannelWxmpAccessRecordDao, LandingChannelWxmpAccessRecord> {

    @Resource
    LandingChannelWxmpAccessRecordDao landingChannelWxmpAccessRecordDao;

    public List<Map<String, Object>> selectJoinWxcorpList(List<String> ffromList, String startTime, String endTime, Paging paging) {
        Page<Map<String, Object>> result = landingChannelWxmpAccessRecordDao.selectJoinWxcorpList(Paging.page(paging), ffromList, startTime, endTime);
        Paging.setPage(paging, result);
        return result.getRecords();
    }

    public List<Map<String, Object>> selectUnJoinWxcorpList(List<String> ffromList, String startTime, String endTime, Paging paging) {
        Page<Map<String, Object>> result = landingChannelWxmpAccessRecordDao.selectUnJoinWxcorpList(Paging.page(paging), ffromList, startTime, endTime);
        Paging.setPage(paging, result);
        return result.getRecords();
    }
}
