Commit f48267f1 by chamberone

feat: 修复dao方法

1 parent 0811506e
......@@ -22,7 +22,7 @@ public class BlockServiceImpl implements IBlockService {
@Override
public Result<Boolean> synchronizeBlock(String blockId, Long area, RegionDTO region) {
MapBlockInfoEntity mapBlockInfoEntity = mapBlockInfoDao.findByBlockId(blockId);
MapBlockInfoEntity mapBlockInfoEntity = mapBlockInfoDao.findByAreaIds(blockId);
if (null == mapBlockInfoEntity) {
return Result.failure(blockId + " blockId不存在");
}
......
......@@ -237,7 +237,7 @@ public class BusinessBlockServiceImpl implements BusinessBlockService {
@Transactional
@Override
public Result<?> businessServiceBlockRemove(String blockId) throws BusinessException {
MapBlockInfoEntity block = mapBlockInfoDao.findByBlockId(blockId);
MapBlockInfoEntity block = mapBlockInfoDao.findByAreaIds(blockId);
if (block == null) {
throw new BusinessException("区块不存在");
}
......@@ -257,7 +257,7 @@ public class BusinessBlockServiceImpl implements BusinessBlockService {
@Override
public Result<?> saasBaseDataLayerUrl(String blockId) throws BusinessException {
MapBlockInfoEntity block = mapBlockInfoDao.findByBlockId(blockId);
MapBlockInfoEntity block = mapBlockInfoDao.findByAreaIds(blockId);
if (block == null) {
throw new BusinessException("区块不存在");
}
......
......@@ -54,7 +54,7 @@ public class FendanServiceImpl implements FendanService {
//2:根据查询出区划匹配工作队
String peaBrand = fixBrand(request.getBrand());
List<String> blockIds = blockInfos.stream().map(SaasUtils.BlockInfo::getBlockId).distinct().collect(Collectors.toList());
List<MapBlockInfoEntity> mapBlockInfoEntities = mapBlockInfoDao.findByBlockIdIn(blockIds);
List<MapBlockInfoEntity> mapBlockInfoEntities = mapBlockInfoDao.findByAreaIdsIn(blockIds);
if (CollectionUtils.isEmpty(mapBlockInfoEntities)) {
return Result.failed(StatusCodeEnum.FENDAN_TEAM_UNMATCHED);
}
......@@ -156,7 +156,7 @@ public class FendanServiceImpl implements FendanService {
//区划所在范围并分配到具体技能的工作队
List<MapBlockInfoEntity> mapBlockInfoList = mapBlockInfoDao.listTeamIdByBrandAndSkillAndBlockIds(peaBrand, request.getProductType(), request.getServiceType(), blockIds);
//区划所在范围所有工作队
List<MapBlockInfoEntity> mapBlockInBlockIdsList = mapBlockInfoDao.findByBlockIdIn(blockIds);
List<MapBlockInfoEntity> mapBlockInBlockIdsList = mapBlockInfoDao.findByAreaIdsIn(blockIds);
if (CollectionUtils.isEmpty(mapBlockInfoList) && CollectionUtils.isEmpty(mapBlockInBlockIdsList)) {
return Result.failed(StatusCodeEnum.FENDAN_TEAM_UNMATCHED);
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!