Prechádzať zdrojové kódy

支付宝设备信息修改

谭斌 2 rokov pred
rodič
commit
da88924560

+ 2 - 2
device-api-service/src/main/java/com/xy/service/DeviceInfoServiceImpl.java

@@ -270,10 +270,10 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
     public R update(@RequestBody @Validated DeviceInfoDto.Update update) {
         DeviceInfo deviceInfo = copy(DeviceInfo.class, update)
                 .setUpdateTime(LocalDateTime.now());
-        Integer deviceType = deviceInfo.getDeviceType();
         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)) {
-            DeviceInfoDto.Vo device = R.feignCheckData(this.obj(new DeviceInfoDto.Obj().setDeviceId(update.getDeviceId()).setIsSysinfo(true)));
             DeviceUpdateDTO deviceUpdateDTO = new DeviceUpdateDTO();
             if (StrUtil.isNotEmpty(update.getDeviceName())) {
                 deviceUpdateDTO.setDeviceName(update.getDeviceName());