package com.yunzhi.marketing.xlk.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yunzhi.marketing.base.ResponseBean;
import com.yunzhi.marketing.entity.TaBuilding;
import com.yunzhi.marketing.entity.TaPerson;
import com.yunzhi.marketing.xlk.entity.BuildingChannel;
import com.yunzhi.marketing.xlk.mapper.BuildingChannelMapper;
import com.yunzhi.marketing.xlk.service.IBuildingChannelService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 楼盘渠道表  服务实现类
 * </p>
 *
 * @author jobob
 * @since 2021-07-18
 */
@Service
public class BuildingChannelServiceImpl extends ServiceImpl<BuildingChannelMapper, BuildingChannel> implements IBuildingChannelService {

    /**
     * 获取当前渠道的楼盘列表
     *
     * @param person
     * @return
     */
    @Override
    public ResponseBean getChannelBuildingList(TaPerson person) {
        // 获取当前登录人的渠道信息
        List<TaBuilding> list = this.baseMapper.getChannelBuildingList(person.getPersonId());
        return ResponseBean.success(list);
    }
}
