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.AddressDao;
import io.modules.item.dto.AddressDTO;
import io.modules.item.entity.AddressEntity;
import io.modules.item.service.AddressService;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 收货地址表
 *
 * @author Mark #
 * @since 1.0.0 2025-02-14
 */
@Service
public class AddressServiceImpl extends CrudServiceImpl<AddressDao, AddressEntity, AddressDTO> implements AddressService {

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

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

        return wrapper;
    }


}