StructureMapper.java 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. package cn.cslg.pas.mapper;
  2. import cn.cslg.pas.common.model.vo.StructureVO;
  3. import cn.cslg.pas.domain.Structure;
  4. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  5. import org.springframework.stereotype.Repository;
  6. import java.util.List;
  7. /**
  8. * 架构表的Mapper层接口
  9. *
  10. * @Author chenyu
  11. * @Date 2023/3/10
  12. */
  13. @Repository
  14. public interface StructureMapper extends BaseMapper<Structure> {
  15. /**
  16. * 插入数据
  17. *
  18. * @param structure 数据对象
  19. * @return 返回受影响的行数
  20. */
  21. int insert(Structure structure);
  22. /**
  23. * 根据id删除数据
  24. *
  25. * @param id 架构id
  26. * @return 返回受影响的行数
  27. */
  28. int deleteById(Integer id);
  29. /**
  30. * 根据id批量删除数据
  31. *
  32. * @param ids 架构ids
  33. * @return 返回受影响的行数
  34. */
  35. int deleteByIds(List<Integer> ids);
  36. /**
  37. * 根据id修改数据
  38. *
  39. * @param structure 数据对象
  40. * @return 返回受影响的行数
  41. */
  42. int update(Structure structure);
  43. /**
  44. * 根据父级id和名称和架构id统计数量
  45. *
  46. * @param parentId 父级id
  47. * @param structureName 架构名称
  48. * @param structureId 架构id
  49. * @return 返回统计到的数量
  50. */
  51. int countByparentIdAndStructureName(Integer parentId, String structureName, Integer structureId);
  52. /**
  53. * 根据id查询数据
  54. *
  55. * @param id 架构id
  56. * @return 返回查询到的数据
  57. */
  58. Structure getStandardById(Integer id);
  59. /**
  60. * 根据id查询数据和图片
  61. *
  62. * @param id 架构id
  63. * @return 返回查询到的数据
  64. */
  65. StructureVO getStandardAndPictureById(Integer id);
  66. /**
  67. * 根据父级id和产品id查询数据
  68. *
  69. * @param parentId 父级id
  70. * @param productId 产品id
  71. * @param ids 架构ids(此为根据名称模糊查询架构树单一分支)
  72. * @return 返回查询到的数据
  73. */
  74. List<StructureVO> selectByParentIdAndProductId(Integer parentId, Integer productId, List<Integer> ids);
  75. /**
  76. * 根据父级id和产品id查询数据
  77. *
  78. * @param parentId 父级id
  79. * @param productId 产品id
  80. * @param ids 架构ids(此为根据名称模糊查询架构树单一分支)
  81. * @return 返回查询到的数据
  82. */
  83. List<StructureVO> selectTree(Integer parentId, Integer productId, List<Integer> ids);
  84. /**
  85. * 根据模糊路径查询数据
  86. *
  87. * @param findInSetPath 模糊路径
  88. * @return 返回查询到的数据
  89. */
  90. List<StructureVO> selectByFindInSetPath(String findInSetPath);
  91. /**
  92. * 根据产品id查询数据
  93. *
  94. * @param productId 产品id
  95. * @return 返回查询到的数据
  96. */
  97. List<StructureVO> selectAllByProductId(Integer productId);
  98. /**
  99. * 根据架构id查询数据
  100. *
  101. * @param structureId 架构id
  102. * @return 返回查询到的数据
  103. */
  104. List<StructureVO> selectAllByStructureId(Integer structureId);
  105. }