Commit e55d5fa6 by 王力

Merge branch 'dev_bussiness_layer0726' into 'develop'

Dev bussiness layer0726

See merge request !281
2 parents d4588167 8422abf0
...@@ -3,7 +3,11 @@ package com.dituhui.pea.order.dao; ...@@ -3,7 +3,11 @@ package com.dituhui.pea.order.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dituhui.pea.order.entity.MapBlockInfo; import com.dituhui.pea.order.entity.MapBlockInfo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
@Mapper @Mapper
public interface MapBlockInfoMPDao extends BaseMapper<MapBlockInfo> { public interface MapBlockInfoMPDao extends BaseMapper<MapBlockInfo> {
@Select("select * from map_block_info where block_id=#{blockId}")
MapBlockInfo getByBlockId(String blockId);
} }
...@@ -2,6 +2,7 @@ package com.dituhui.pea.order.service.impl; ...@@ -2,6 +2,7 @@ package com.dituhui.pea.order.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dituhui.pea.common.BusinessException;
import com.dituhui.pea.common.Result; import com.dituhui.pea.common.Result;
import com.dituhui.pea.order.common.ListUtils; import com.dituhui.pea.order.common.ListUtils;
import com.dituhui.pea.order.common.TimeUtils; import com.dituhui.pea.order.common.TimeUtils;
...@@ -112,12 +113,25 @@ public class BusinessBlockServiceImpl implements BusinessBlockService { ...@@ -112,12 +113,25 @@ public class BusinessBlockServiceImpl implements BusinessBlockService {
} }
@Override @Override
public Result<?> businessServiceBlockDelete(String blockId) { public Result<?> businessServiceBlockDelete(String blockId) throws BusinessException{
return null; MapBlockInfo block = mapBlockInfoMPDao.getByBlockId(blockId);
if(block == null) {
throw new BusinessException("区块不存在");
}
block.setStatus(0);
mapBlockInfoMPDao.updateById(block);
return Result.success(null);
} }
@Override @Override
public Result<?> saasBaseDataLayerUrl(String blockId) { public Result<?> saasBaseDataLayerUrl(String blockId) throws BusinessException{
return null; MapBlockInfo block = mapBlockInfoMPDao.getByBlockId(blockId);
if(block == null) {
throw new BusinessException("区块不存在");
}
// 跳转规则: TODO
HashMap<String, String> res = new HashMap<>();
res.put("url", "https://pea-test.bshg.com.cn/mlAutoLogin?userAccount=WVyjhzcOeIUc5rl74hdaqw==&password=qjOHxpQPXLnJP+Jq1CZGBQ==&jump=basedata&navHidden=true");
return Result.success(res);
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!