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

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.hmit.common.service.impl.CrudServiceImpl;
import io.hmit.modules.appointment.dao.AppointmentServiceDao;
import io.hmit.modules.appointment.dto.AppointmentServiceDTO;
import io.hmit.modules.appointment.entity.AppointmentServiceEntity;
import io.hmit.modules.appointment.service.AppointmentServiceService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 可供预约的服务事项种类(不确定是否数据落地)。
 *
 * @author zsh 408538940@qq.com
 * @since 1.0.0 2021-02-13
 */
@Service
public class AppointmentServiceServiceImpl extends CrudServiceImpl<AppointmentServiceDao, AppointmentServiceEntity, AppointmentServiceDTO> implements AppointmentServiceService {

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

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

        return wrapper;
    }


}