package io.hmit.modules.committee.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.modules.committee.dao.CommitteeDao;
import io.hmit.modules.committee.dto.CommitteeDTO;
import io.hmit.modules.committee.entity.CommitteeEntity;
import io.hmit.modules.committee.service.CommitteeService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 委员会管理
 *
 * @author syf syf0412@qq.com
 * @since 1.0.0 2020-12-25
 */
@Service
public class CommitteeServiceImpl extends CrudServiceImpl<CommitteeDao, CommitteeEntity, CommitteeDTO> implements CommitteeService {

    @Override
    public QueryWrapper<CommitteeEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<CommitteeEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotBlank(id), "id", id);

        return wrapper;
    }


}