Commit 6c47fdc5 by chamberone

feat: 修复dao方法

1 parent 1795b64d
...@@ -12,9 +12,9 @@ import java.util.List; ...@@ -12,9 +12,9 @@ import java.util.List;
@Repository @Repository
public interface MapBlockInfoDao extends JpaRepository<MapBlockInfoEntity, Integer>, JpaSpecificationExecutor<MapBlockInfoEntity> { public interface MapBlockInfoDao extends JpaRepository<MapBlockInfoEntity, Integer>, JpaSpecificationExecutor<MapBlockInfoEntity> {
List<MapBlockInfoEntity> findByBlockIdInAndLayerIdIn(List<String> blockIds, List<String> layerIds); List<MapBlockInfoEntity> findByAreaIdsInAndLayerIdIn(List<String> blockIds, List<String> layerIds);
MapBlockInfoEntity findByBlockId(String blockId); MapBlockInfoEntity findByAreaIds(String blockId);
List<MapBlockInfoEntity> findByGroupId(String groupId); List<MapBlockInfoEntity> findByGroupId(String groupId);
...@@ -22,10 +22,10 @@ public interface MapBlockInfoDao extends JpaRepository<MapBlockInfoEntity, Integ ...@@ -22,10 +22,10 @@ public interface MapBlockInfoDao extends JpaRepository<MapBlockInfoEntity, Integ
MapBlockInfoEntity findByTeamIdAndLayerId(String teamId, String layerId); MapBlockInfoEntity findByTeamIdAndLayerId(String teamId, String layerId);
List<MapBlockInfoEntity> findByBlockIdIn(List<String> blockIds); List<MapBlockInfoEntity> findByAreaIdsIn(List<String> blockIds);
@Query(value = "select mbi.* from map_block_info mbi left join skill_info si on mbi.layer_id = si.layer_id left join map_layer_customize mlc on mlc.layer_id = mbi.layer_id " + @Query(value = "select mbi.* from map_block_info mbi left join skill_info si on mbi.layer_id = si.layer_id left join map_layer_customize mlc on mlc.layer_id = mbi.layer_id " +
"where si.brand = :brand and si.`type` = :productType and si.skill = :skill and mbi.block_id in ( :blockIds ) order by mlc.priority ", nativeQuery = true) "where si.brand = :brand and si.`type` = :productType and si.skill = :skill and mbi.area_ids in ( :blockIds ) order by mlc.priority ", nativeQuery = true)
List<MapBlockInfoEntity> listTeamIdByBrandAndSkillAndBlockIds(@Param("brand") String brand, @Param("productType") String productType, List<MapBlockInfoEntity> listTeamIdByBrandAndSkillAndBlockIds(@Param("brand") String brand, @Param("productType") String productType,
@Param("skill") String skill, @Param("blockIds") List<String> blockIds); @Param("skill") String skill, @Param("blockIds") List<String> blockIds);
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!