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.AppointmentTimeManageDao;
import io.hmit.modules.appointment.dto.AppointmentTimeManageDTO;
import io.hmit.modules.appointment.entity.AppointmentTimeManageEntity;
import io.hmit.modules.appointment.service.AppointmentTimeManageService;
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-15
 */
@Service
public class AppointmentTimeManageServiceImpl extends CrudServiceImpl<AppointmentTimeManageDao, AppointmentTimeManageEntity, AppointmentTimeManageDTO> implements AppointmentTimeManageService {

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

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

        return wrapper;
    }


}