mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-03 17:40:13 +08:00
Merge branch 'dev' of http://192.168.2.46:8099/jsowell/jsowell-charger-web into dev
This commit is contained in:
@@ -224,7 +224,7 @@ public class PileStationInfoController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('pile:station:query')")
|
||||
@PostMapping(value = "/selectStationListByMerchantId")
|
||||
public AjaxResult selectStationListByMerchantId(@RequestBody QueryStationDTO dto) {
|
||||
return AjaxResult.success(pileStationInfoService.selectStationListByMerchantId(Long.valueOf(dto.getMerchantId())));
|
||||
return AjaxResult.success(pileStationInfoService.selectStationListByMerchantIdWithAuth(Long.valueOf(dto.getMerchantId())));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -68,7 +68,7 @@ public class NettyServerHandler extends ChannelInboundHandlerAdapter {
|
||||
*/
|
||||
@Override
|
||||
public void channelRead(ChannelHandlerContext ctx, Object message) throws Exception {
|
||||
log.info("加载客户端报文channelRead=== channelId:" + ctx.channel().id() + ", msg:" + message);
|
||||
// log.info("加载客户端报文channelRead=== channelId:" + ctx.channel().id() + ", msg:" + message);
|
||||
// 下面可以解析数据,保存数据,生成返回报文,将需要返回报文写入write函数
|
||||
byte[] msg = (byte[]) message;
|
||||
|
||||
|
||||
@@ -45,6 +45,14 @@ public interface PileStationInfoService {
|
||||
*/
|
||||
public List<PileStationInfo> selectStationListByMerchantId(Long merchantId);
|
||||
|
||||
/**
|
||||
* 通过运营商id查询站点信息(带权限校验)
|
||||
*
|
||||
* @param merchantId 运营商id
|
||||
* @return 站点信息列表
|
||||
*/
|
||||
public List<PileStationInfo> selectStationListByMerchantIdWithAuth(Long merchantId);
|
||||
|
||||
/**
|
||||
* 新增充电站信息
|
||||
*
|
||||
|
||||
@@ -270,6 +270,30 @@ public class PileStationInfoServiceImpl implements PileStationInfoService {
|
||||
return pileStationInfoMapper.selectStationListByMerchantId(merchantId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过运营商id查询站点信息(带权限校验)
|
||||
*
|
||||
* @param merchantId 运营商id
|
||||
* @return 站点信息列表
|
||||
*/
|
||||
@Override
|
||||
public List<PileStationInfo> selectStationListByMerchantIdWithAuth(Long merchantId) {
|
||||
AuthorizedDeptVO authorizedMap = UserUtils.getAuthorizedMap();
|
||||
if (authorizedMap == null) {
|
||||
return null;
|
||||
}
|
||||
List<PileStationInfo> pileStationInfos = pileStationInfoMapper.selectStationListByMerchantId(merchantId);
|
||||
// 站点管理员
|
||||
if (CollectionUtils.isNotEmpty(authorizedMap.getStationDeptIds())) {
|
||||
List<String> stationDeptIds = authorizedMap.getStationDeptIds();
|
||||
// 筛选出来符合deptIds的数据
|
||||
pileStationInfos = pileStationInfos.stream()
|
||||
.filter(pileStationInfo -> stationDeptIds.contains(pileStationInfo.getDeptId()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
return pileStationInfos;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增充电站信息
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user