|
@@ -92,6 +92,7 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
private final RedisService<String> redisService;
|
|
private final RedisService<String> redisService;
|
|
private final GoodsService goodsService;
|
|
private final GoodsService goodsService;
|
|
private final OrderRefundService refundService;
|
|
private final OrderRefundService refundService;
|
|
|
|
+ private final AlipayDeviceService alipayDeviceService;
|
|
private final String keyPrefix = "device:history:";
|
|
private final String keyPrefix = "device:history:";
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -100,8 +101,8 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
List<DeviceInfoDto.NetStateCount> netStateCountList = baseMapper.netStateCount(dto.getMercIdList());
|
|
List<DeviceInfoDto.NetStateCount> netStateCountList = baseMapper.netStateCount(dto.getMercIdList());
|
|
List<Long> netStateCountMercList = netStateCountList.stream().map(DeviceInfoDto.NetStateCount::getMercId).distinct().collect(Collectors.toList());
|
|
List<Long> netStateCountMercList = netStateCountList.stream().map(DeviceInfoDto.NetStateCount::getMercId).distinct().collect(Collectors.toList());
|
|
Map<Long, DeviceInfoDto.NetStateCountVo> voMap = new HashMap<>();
|
|
Map<Long, DeviceInfoDto.NetStateCountVo> voMap = new HashMap<>();
|
|
- List<Long> mercIdList = Emptys.check(dto.getMercIdList())?dto.getMercIdList():netStateCountMercList;
|
|
|
|
- if(!Emptys.check(mercIdList)){
|
|
|
|
|
|
+ List<Long> mercIdList = Emptys.check(dto.getMercIdList()) ? dto.getMercIdList() : netStateCountMercList;
|
|
|
|
+ if (!Emptys.check(mercIdList)) {
|
|
return R.ok();
|
|
return R.ok();
|
|
}
|
|
}
|
|
for (Long mercId : mercIdList) {
|
|
for (Long mercId : mercIdList) {
|
|
@@ -270,6 +271,21 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|
DeviceInfo deviceInfo = copy(DeviceInfo.class, update)
|
|
DeviceInfo deviceInfo = copy(DeviceInfo.class, update)
|
|
.setUpdateTime(LocalDateTime.now());
|
|
.setUpdateTime(LocalDateTime.now());
|
|
updateById(deviceInfo);
|
|
updateById(deviceInfo);
|
|
|
|
+ DeviceInfoDto.Vo device = R.feignCheckData(this.obj(new DeviceInfoDto.Obj().setDeviceId(update.getDeviceId()).setIsSysinfo(true)));
|
|
|
|
+ Integer deviceType = device.getDeviceType();
|
|
|
|
+ if (ObjectUtil.equals(DeviceTypeEnum.TYPE5.getCode(), deviceType)) {
|
|
|
|
+ DeviceUpdateDTO deviceUpdateDTO = new DeviceUpdateDTO();
|
|
|
|
+ if (StrUtil.isNotEmpty(update.getDeviceName())) {
|
|
|
|
+ deviceUpdateDTO.setDeviceName(update.getDeviceName());
|
|
|
|
+ }
|
|
|
|
+ String deviceSn = device.getDeviceSysinfo().getDeviceSn();
|
|
|
|
+ if (deviceUpdateDTO != null) {
|
|
|
|
+ deviceUpdateDTO.setTerminalId(String.valueOf(update.getDeviceId()));
|
|
|
|
+ deviceUpdateDTO.setBoardSn(deviceSn);
|
|
|
|
+
|
|
|
|
+ alipayDeviceService.deviceUpdate(deviceUpdateDTO);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return R.ok();
|
|
return R.ok();
|
|
}
|
|
}
|
|
|
|
|