Commit ecda40d300db4c6559fe817a6a6b46a19e7713b1
1 parent
efb20922
fix:单测报错
Showing
3 changed files
with
5 additions
and
4 deletions
yudao-module-iot/yudao-module-iot-biz/src/main/java/cn/iocoder/yudao/module/iot/controller/admin/ota/IotOtaTaskRecordController.java
| 1 | 1 | package cn.iocoder.yudao.module.iot.controller.admin.ota; |
| 2 | 2 | |
| 3 | -4import cn.hutool.core.collection.CollUtil; | |
| 3 | +import cn.hutool.core.collection.CollUtil; | |
| 4 | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 5 | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | 6 | import cn.iocoder.yudao.framework.common.util.collection.MapUtils; | ... | ... |
yudao-module-iot/yudao-module-iot-core/src/main/java/cn/iocoder/yudao/module/iot/core/enums/IotDeviceMessageMethodEnum.java
| ... | ... | @@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.iot.core.enums; |
| 2 | 2 | |
| 3 | 3 | import cn.hutool.core.util.ArrayUtil; |
| 4 | 4 | import cn.iocoder.yudao.framework.common.core.ArrayValuable; |
| 5 | +import cn.iocoder.yudao.framework.common.util.collection.SetUtils; | |
| 5 | 6 | import lombok.AllArgsConstructor; |
| 6 | 7 | import lombok.Getter; |
| 7 | 8 | |
| ... | ... | @@ -57,7 +58,7 @@ public enum IotDeviceMessageMethodEnum implements ArrayValuable<String> { |
| 57 | 58 | /** |
| 58 | 59 | * 不进行 reply 回复的方法集合 |
| 59 | 60 | */ |
| 60 | - public static final Set<String> REPLY_DISABLED = Set.of( | |
| 61 | + public static final Set<String> REPLY_DISABLED = SetUtils.asSet( | |
| 61 | 62 | STATE_UPDATE.getMethod(), |
| 62 | 63 | OTA_PROGRESS.getMethod() // 参考阿里云,OTA 升级进度上报,不进行回复 |
| 63 | 64 | ); | ... | ... |
yudao-module-pay/src/test/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceTest.java
| ... | ... | @@ -610,7 +610,7 @@ public class PayOrderServiceTest extends BaseDbAndRedisUnitTest { |
| 610 | 610 | orderExtensionMapper.insert(orderExtension); |
| 611 | 611 | // 重要:需要将 order 的 extensionId 更新下 |
| 612 | 612 | order.setExtensionId(orderExtension.getId()); |
| 613 | - orderMapper.updateById(order); | |
| 613 | + orderMapper.updateById(new PayOrderDO().setId(order.getId()).setExtensionId(orderExtension.getId())); | |
| 614 | 614 | // 准备参数 |
| 615 | 615 | PayChannelDO channel = randomPojo(PayChannelDO.class, o -> o.setId(10L)); |
| 616 | 616 | PayOrderRespDTO notify = randomPojo(PayOrderRespDTO.class, |
| ... | ... | @@ -622,7 +622,7 @@ public class PayOrderServiceTest extends BaseDbAndRedisUnitTest { |
| 622 | 622 | // 断言 PayOrderExtensionDO :数据未更新,因为它是 SUCCESS |
| 623 | 623 | assertPojoEquals(orderExtension, orderExtensionMapper.selectOne(null)); |
| 624 | 624 | // 断言 PayOrderDO :数据未更新,因为它是 SUCCESS |
| 625 | - assertPojoEquals(order, orderMapper.selectOne(null)); | |
| 625 | + assertPojoEquals(order, orderMapper.selectOne(null), "updateTime", "updater"); | |
| 626 | 626 | // 断言,调用 |
| 627 | 627 | verify(notifyService, never()).createPayNotifyTask(anyInt(), anyLong()); |
| 628 | 628 | } | ... | ... |