package com.doumee.service.business;
|
|
import com.doumee.core.model.PageData;
|
import com.doumee.core.model.PageWrap;
|
import com.doumee.dao.business.model.Areas;
|
import java.util.List;
|
|
/**
|
* 省市区信息表Service定义
|
* @author 江蹄蹄
|
* @date 2023/02/15 08:55
|
*/
|
public interface AreasService {
|
|
/**
|
* 创建
|
*
|
* @param areas 实体对象
|
* @return Integer
|
*/
|
Integer create(Areas areas);
|
|
/**
|
* 主键删除
|
*
|
* @param id 主键
|
*/
|
void deleteById(Integer id);
|
|
/**
|
* 删除
|
*
|
* @param areas 实体对象
|
*/
|
void delete(Areas areas);
|
|
/**
|
* 批量主键删除
|
*
|
* @param ids 主键集
|
*/
|
void deleteByIdInBatch(List<Integer> ids);
|
|
/**
|
* 主键更新
|
*
|
* @param areas 实体对象
|
*/
|
void updateById(Areas areas);
|
|
/**
|
* 批量主键更新
|
*
|
* @param areass 实体集
|
*/
|
void updateByIdInBatch(List<Areas> areass);
|
|
/**
|
* 主键查询
|
*
|
* @param id 主键
|
* @return Areas
|
*/
|
Areas findById(Integer id);
|
|
/**
|
* 根据id和type查询对象信息
|
* @param id
|
* @param type null 查询全部 0省份 1城市 2区域
|
* @return
|
*/
|
Areas findById(Integer id,Integer type);
|
|
|
Areas findByName(String name,Integer type);
|
Areas findByNameAndParentId(String name,Integer type,Integer parentId);
|
|
List<Areas> findByParentId(Integer type,Integer parentId);
|
|
List<Areas> findChildByParentId(Integer id,List<Areas> list);
|
|
boolean isAreaValid(String proName,String cityName,String areaName);
|
|
/**
|
* 条件查询单条记录
|
*
|
* @param areas 实体对象
|
* @return Areas
|
*/
|
Areas findOne(Areas areas);
|
|
/**
|
* 条件查询
|
*
|
* @param areas 实体对象
|
* @return List<Areas>
|
*/
|
List<Areas> findList(Areas areas);
|
|
/**
|
* 分页查询
|
*
|
* @param pageWrap 分页对象
|
* @return PageData<Areas>
|
*/
|
PageData<Areas> findPage(PageWrap<Areas> pageWrap);
|
|
/**
|
* 条件统计
|
*
|
* @param areas 实体对象
|
* @return long
|
*/
|
long count(Areas areas);
|
|
void cacheData();
|
|
Areas findByCityAndArea(String cityName, String areasName);
|
|
String getAddress(Integer cityId,Integer areaId);
|
|
List<Areas> listByParentId(Areas model);
|
}
|