Commit 7d1e1903 by chamberone

feat: 区块删除接口更新

1 parent c5885899
...@@ -266,7 +266,7 @@ public class BusinessBlockServiceImpl implements BusinessBlockService { ...@@ -266,7 +266,7 @@ public class BusinessBlockServiceImpl implements BusinessBlockService {
@Transactional @Transactional
@Override @Override
public Result<?> businessServiceBlockRemove(String blockId) throws BusinessException { public Result<?> businessServiceBlockRemove(String blockId) throws BusinessException {
MapBlockInfoEntity block = mapBlockInfoDao.findByAreaIds(blockId); MapBlockInfoEntity block = mapBlockInfoDao.getById(Integer.parseInt(blockId));
if (block == null) { if (block == null) {
throw new BusinessException("区块不存在"); throw new BusinessException("区块不存在");
} }
...@@ -274,12 +274,12 @@ public class BusinessBlockServiceImpl implements BusinessBlockService { ...@@ -274,12 +274,12 @@ public class BusinessBlockServiceImpl implements BusinessBlockService {
entityManager.merge(block); entityManager.merge(block);
// 同步删除saas区块 // 同步删除saas区块
String result = saasRemoteService.deleteArea(ak, blockId); // String result = saasRemoteService.deleteArea(ak, blockId);
log.info("params:{} result:{}", blockId, result); // log.info("params:{} result:{}", blockId, result);
Result<Boolean> saasResult = TypeUtils.convertResult(result); // Result<Boolean> saasResult = TypeUtils.convertResult(result);
if (!ResultEnum.SUCCESS.getCode().equals(saasResult.getCode())) { // if (!ResultEnum.SUCCESS.getCode().equals(saasResult.getCode())) {
return Result.failure("删除失败,请联系管理员"); // return Result.failure("删除失败,请联系管理员");
} // }
return Result.success(null); return Result.success(null);
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!