package io.renren.modules.sys.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.sys.dao.AdvertBusinessDistrictDao;
import io.renren.modules.sys.dto.AdvertBusinessDistrictDTO;
import io.renren.modules.sys.entity.AdvertBusinessDistrictEntity;
import io.renren.modules.sys.service.AdvertBusinessDistrictService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 地域列表
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2022-06-13
 */
@Service
public class AdvertBusinessDistrictServiceImpl extends CrudServiceImpl<AdvertBusinessDistrictDao, AdvertBusinessDistrictEntity, AdvertBusinessDistrictDTO> implements AdvertBusinessDistrictService {

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

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

        return wrapper;
    }


}