package com.community.huiju.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.community.huiju.common.base.ResponseBean;
import com.community.huiju.model.TpPhase;
import com.community.huiju.dao.TpPhaseMapper;
import com.community.huiju.service.ITpPhaseService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 小区期区资料表 服务实现类
 * </p>
 *
 * @author jobob
 * @since 2019-05-15
 */
@Service
public class TpPhaseServiceImpl extends ServiceImpl<TpPhaseMapper, TpPhase> implements ITpPhaseService {

    @Override
    public ResponseBean getPhase(Integer communityId) {
        ResponseBean responseBean = new ResponseBean();

        QueryWrapper<TpPhase> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("community_id", communityId);
        List<TpPhase> list = this.list(queryWrapper);
        responseBean.addSuccess(list);
        return responseBean;
    }
}
