package com.yunzhi.marketing.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yunzhi.marketing.base.ResponseBean;
import com.yunzhi.marketing.entity.TdBizEvent;
import com.yunzhi.marketing.mapper.TdBizEventMapper;
import com.yunzhi.marketing.service.ITdBizEventService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 事件字典  服务实现类
 * </p>
 *
 * @author jobob
 * @since 2019-08-06
 */
@Service
public class TdBizEventServiceImpl extends ServiceImpl<TdBizEventMapper, TdBizEvent> implements ITdBizEventService {

    @Autowired
    private TdBizEventMapper tdBizEventMapper;

    @Override
    public ResponseBean getBizEventAndIntention(IPage<TdBizEvent> pg, String buildingId, Integer orgId) {
        ResponseBean responseBean = new ResponseBean();
        IPage<TdBizEvent> page = tdBizEventMapper.selectBizEventAndIntention(pg, buildingId, orgId);
        responseBean.addSuccess(page);
        return responseBean;
    }
}
