package io.renren.modules.admin.service.impl;

import java.util.Map;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.admin.dao.TypesOfFeeDao;
import io.renren.modules.admin.entity.TypesOfFeeEntity;
import io.renren.modules.admin.service.TypesOfFeeService;

@Service("typesOfFeeService")
public class TypesOfFeeServiceImpl extends ServiceImpl<TypesOfFeeDao, TypesOfFeeEntity> implements TypesOfFeeService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {

        String meetingId = (String)params.get("meetingId");
        IPage<TypesOfFeeEntity> page = this.page(
                new Query<TypesOfFeeEntity>().getPage(params),
                new QueryWrapper<TypesOfFeeEntity>().eq(StringUtils.isNotBlank(meetingId),"meeting_id", meetingId)
        );

        return new PageUtils(page);
    }
}