package com.moon.server.mapper.data; import com.moon.server.entity.data.MetaEntity; import com.moon.server.entity.data.MetaPubEntity; import com.moon.server.entity.data.PublishEntity; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; import java.util.List; /** * 数据发布 * @author WWW */ @Mapper @Repository public interface PublishMapper { /** * 查询记录数 * * @param name 名称 * @param dircode 目录编码 * @param type 类别 * @return 记录数 */ public Integer selectCount(String name, String dircode, String type); /** * 分页查询 * * @param name 名称 * @param dircode 目录编码 * @param type 类别 * @param limit 记录数 * @param offset 偏移量 * @return 列表 */ public List selectByPage(String name, String dircode, String type, Integer limit, Integer offset); /** * 查询所有 * * @return */ public List selectAll(); /** * 根据ID查询 * * @param id * @return */ public PublishEntity selectById(int id); /** * 根据ID字符串查询 * * @param ids ID字符串 * @return 记录集合 */ public List selectByIds(String ids); /** * 根据发布ID查询元数据 * * @param pubid 发布ID * @return 元数据集合 */ public List selectMetasByPubid(Integer pubid); /** * 查询栅格数据发布 * * @return 发布实体类 */ public List selectRaster(); /** * 根据图层ID查询 * * @param layerId 图层ID * @return 发布实体类 */ public PublishEntity selectByLayerId(Integer layerId); /** * 根据目录查询DOM和DEM的编码 * * @param dircode 目录 * @param isDom 1-DOM,0-DEM * @return */ public List selectCodesForDir(String dircode, Integer isDom); /** * 插入一条 * * @param entity * @return */ public Integer insert(PublishEntity entity); /** * 插入多条 * * @param list * @return */ public Integer inserts(List list); /** * 插入数据发布-下载表 * * @param pubid * @param downid * @param createUser * @return */ public Integer insertPubDown(Integer pubid, Integer downid, Integer createUser); /** * 插入元数据发布类 * * @param mp 元数据发布类 * @return 影响行数 */ public Integer insertMetaPub(MetaPubEntity mp); /** * 删除一条 * * @param id * @return */ public Integer delete(int id); /** * 删除多条 * * @param ids * @return */ public Integer deletes(String ids); /** * 更新一条 * * @param entity * @return */ public Integer update(PublishEntity entity); /** * 更新多条 * * @param list * @return */ public Integer updates(List list); /** * 查询元数据记录数 * * @param depcode 单位编码 * @param dircode 目录编码 * @param verid 版本ID * @param types 类别 * @param name 名称 * @return 记录数 */ public Integer selectMetasByCount(String depcode, String dircode, Integer verid, String types, String name); /** * 分页查询 * * @param depcode 单位编码 * @param dircode 目录编码 * @param verid 版本ID * @param types 类别 * @param name 名称 * @param limit 记录数 * @param offset 偏移量 * @return 列表 */ public List selectMetasByPage(String depcode, String dircode, Integer verid, String types, String name, Integer limit, Integer offset); }