package cn.sh.stc.sict.theme.hphy.service.impl;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.AllArgsConstructor;

import cn.sh.stc.sict.theme.hphy.dao.HphyPatientBaseMapper;
import cn.sh.stc.sict.theme.hphy.model.HphyPatientBase;
import cn.sh.stc.sict.theme.hphy.service.HphyPatientBaseService;


@Service("hphyPatientBaseService")
@AllArgsConstructor
public class HphyPatientBaseServiceImpl extends ServiceImpl<HphyPatientBaseMapper, HphyPatientBase> implements HphyPatientBaseService {

    private final HphyPatientBaseMapper hphyPatientBaseMapper;

    @Override
    public HphyPatientBase getByOpenId(String openId) {
        LambdaQueryWrapper<HphyPatientBase> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(HphyPatientBase::getOpenId, openId);

        return this.getOne(wrapper);
    }
}
