package io.modules.item.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.hutool.core.util.StrUtil;
import io.common.service.impl.CrudServiceImpl;
import io.modules.item.dao.UserDao;
import io.modules.item.dto.UserDTO;
import io.modules.item.entity.UserEntity;
import io.modules.item.service.UserService;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 用户
 *
 * @author Mark #
 * @since 1.0.0 2025-01-14
 */
@Service
public class UserServiceImpl extends CrudServiceImpl<UserDao, UserEntity, UserDTO> implements UserService {

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

        QueryWrapper<UserEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StrUtil.isNotBlank(id), "id", id);

        return wrapper;
    }


}
