package cn.cslg.pas.mapper; import cn.cslg.pas.common.model.vo.StructureVO; import cn.cslg.pas.domain.Structure; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.springframework.stereotype.Repository; import java.util.List; /** * 架构表的Mapper层接口 * * @Author chenyu * @Date 2023/3/10 */ @Repository public interface StructureMapper extends BaseMapper { /** * 插入数据 * * @param structure 数据对象 * @return 返回受影响的行数 */ int insert(Structure structure); /** * 根据id删除数据 * * @param id 架构id * @return 返回受影响的行数 */ int deleteById(Integer id); /** * 根据id批量删除数据 * * @param ids 架构ids * @return 返回受影响的行数 */ int deleteByIds(List ids); /** * 根据id修改数据 * * @param structure 数据对象 * @return 返回受影响的行数 */ int update(Structure structure); /** * 根据父级id和名称和架构id统计数量 * * @param parentId 父级id * @param structureName 架构名称 * @param structureId 架构id * @return 返回统计到的数量 */ int countByparentIdAndStructureName(Integer parentId, String structureName, Integer structureId); /** * 根据id查询数据 * * @param id 架构id * @return 返回查询到的数据 */ Structure getStandardById(Integer id); /** * 根据id查询数据和图片 * * @param id 架构id * @return 返回查询到的数据 */ StructureVO getStandardAndPictureById(Integer id); /** * 根据父级id和产品id查询数据 * * @param parentId 父级id * @param productId 产品id * @param ids 架构ids(此为根据名称模糊查询架构树单一分支) * @return 返回查询到的数据 */ List selectByParentIdAndProductId(Integer parentId, Integer productId, List ids); /** * 根据父级id和产品id查询数据 * * @param parentId 父级id * @param productId 产品id * @param ids 架构ids(此为根据名称模糊查询架构树单一分支) * @return 返回查询到的数据 */ List selectTree(Integer parentId, Integer productId, List ids); /** * 根据模糊路径查询数据 * * @param findInSetPath 模糊路径 * @return 返回查询到的数据 */ List selectByFindInSetPath(String findInSetPath); /** * 根据产品id查询数据 * * @param productId 产品id * @return 返回查询到的数据 */ List selectAllByProductId(Integer productId); /** * 根据架构id查询数据 * * @param structureId 架构id * @return 返回查询到的数据 */ List selectAllByStructureId(Integer structureId); }