package com.joju.datamanager.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.joju.datamanager.mapper.UserMapper;
import com.joju.datamanager.model.user.User;
import com.joju.datamanager.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @description: 用户业务实现类
 * @author: Mr.zs
 * @create: 2024-03-07 10:32
 **/
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Resource
    private UserMapper userMapper;


    @Override
    public List<User> getOpenidByUserCard(String card) {

        List<User> users = userMapper.selectList(new QueryWrapper<User>().eq("medical_card", card).select("openid","relate"));
        return users;
    }
}
