|
@@ -198,7 +198,11 @@ public class OpenDeviceFactoryImpl implements DeviceFactory {
|
|
|
deviceIds.forEach(deviceId -> {
|
|
|
DeviceInfoDto.Vo dv = R.feignCheckData(deviceInfoService.obj(new DeviceInfoDto.Obj().setDeviceId(deviceId).setIsSysinfo(Boolean.TRUE)));
|
|
|
DeviceSysinfoDto.Vo deviceSysinfo = dv.getDeviceSysinfo();
|
|
|
- if (deviceSysinfo != null && StrUtil.isNotEmpty(deviceSysinfo.getNfcSn())) {
|
|
|
+ if (deviceSysinfo != null && deviceSysinfo.getIsHaveAlipayNpad()) {
|
|
|
+ String nfcSn = deviceSysinfo.getNfcSn();
|
|
|
+ if (StrUtil.isEmpty(nfcSn)) {
|
|
|
+ throw new RuntimeException("nfc sn 不存在!");
|
|
|
+ }
|
|
|
String deviceName = dv.getDeviceName();
|
|
|
if (StrUtil.isEmpty(deviceName)) {
|
|
|
deviceName = "" + deviceId;
|
|
@@ -209,7 +213,7 @@ public class OpenDeviceFactoryImpl implements DeviceFactory {
|
|
|
.setBoardSn(deviceSysinfo.getDeviceSn()).setNfcSn(deviceSysinfo.getNfcSn()).setAddress(dv.getPlaceName());
|
|
|
Boolean b = R.feignCheckData(alipayDeviceService.nfcDeviceActive(activeDeviceDTO));
|
|
|
if (b) {
|
|
|
- throw new RuntimeException("NFC设备激活失败");
|
|
|
+ throw new RuntimeException("NFC设备激活失败!");
|
|
|
}
|
|
|
}
|
|
|
//过滤需要付费的设备
|
|
@@ -240,7 +244,7 @@ public class OpenDeviceFactoryImpl implements DeviceFactory {
|
|
|
ResetDeviceDTO resetParams = new ResetDeviceDTO().setOperatorId(loginId).setOperatorName(loginId).setRemark("设备激活重置").setTerminalId(String.valueOf(deviceId));
|
|
|
alipayDeviceService.nfcDeviceReset(resetParams);
|
|
|
R.feignCheckData(alipayDeviceService.nfcDeviceReset(resetParams));
|
|
|
- deviceSysinfoMapper.updateById(new DeviceSysinfo().setDeviceId(deviceId).setIsHaveAlipayNpad(false).setDeviceSn(StrUtil.EMPTY));
|
|
|
+ deviceSysinfoMapper.updateById(new DeviceSysinfo().setDeviceId(deviceId).setNfcSn(StrUtil.EMPTY));
|
|
|
}
|
|
|
deviceChargingService.removeById(deviceId);
|
|
|
deviceAlgorithmChargingService.remove(new LambdaQueryWrapper<DeviceAlgorithmCharging>()
|