修改 baseMapper selectCount int -> long

Mybatis Plus 在3.4 版本之后将 selectCount 从Integer 改为Long
This commit is contained in:
leosanqing
2022-02-18 11:27:42 +08:00
parent 167baed952
commit 72d18b056b
13 changed files with 20 additions and 15 deletions

View File

@@ -177,7 +177,7 @@ public class DictTypeServiceTest extends BaseDbUnitTest {
// 准备参数
Long id = dbDictType.getId();
// mock 方法
when(dictDataService.countByDictType(eq(dbDictType.getType()))).thenReturn(1);
when(dictDataService.countByDictType(eq(dbDictType.getType()))).thenReturn(1L);
// 调用, 并断言异常
assertServiceException(() -> dictTypeService.deleteDictType(id), DICT_TYPE_HAS_CHILDREN);

View File

@@ -147,7 +147,7 @@ public class SmsChannelServiceTest extends BaseDbUnitTest {
// 准备参数
Long id = dbSmsChannel.getId();
// mock 方法
when(smsTemplateService.countByChannelId(eq(id))).thenReturn(10);
when(smsTemplateService.countByChannelId(eq(id))).thenReturn(10L);
// 调用, 并断言异常
assertServiceException(() -> smsChannelService.deleteSmsChannel(id), SMS_CHANNEL_HAS_CHILDREN);