Skip to content

Commit 7aef861

Browse files
committed
fix: modify tenant API
1 parent e2c1484 commit 7aef861

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

base/src/test/java/com/tinyengine/it/service/app/impl/PageServiceImplTest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void testQueryPageById() {
111111
app.setFramework("Vue");
112112
app.setHomePage(1);
113113
// not home page
114-
when(appMapper.queryAppById(333)).thenReturn(app);
114+
when(appMapper.queryAppById(333, "1")).thenReturn(app);
115115

116116
Page result = pageServiceImpl.queryPageById(1);
117117
assertEquals(returnPage, result);
@@ -151,7 +151,7 @@ void testCreatePage() {
151151
app.setFramework("Vue");
152152
app.setHomePage(1);
153153
// not home page
154-
when(appMapper.queryAppById(333)).thenReturn(app);
154+
when(appMapper.queryAppById(333, "1")).thenReturn(app);
155155
when(pageHistoryService.createPageHistory(any(PageHistory.class))).thenReturn(1);
156156
when(loginUserContext.getLoginUserId()).thenReturn("1");
157157

@@ -186,7 +186,7 @@ void testCreateFolder() {
186186
app.setFramework("Vue");
187187
app.setHomePage(1);
188188
// not home page
189-
when(appMapper.queryAppById(333)).thenReturn(app);
189+
when(appMapper.queryAppById(333, "1")).thenReturn(app);
190190
HashMap<String, List<String>> blockAsset = new HashMap<String, List<String>>() {
191191
{
192192
put("blockAsset", Arrays.asList("getBlockAssetsResponse"));
@@ -222,7 +222,7 @@ void testUpdatePage() {
222222
app.setFramework("Vue");
223223
app.setHomePage(1);
224224
// not home page
225-
when(appMapper.queryAppById(222)).thenReturn(app);
225+
when(appMapper.queryAppById(222, "1")).thenReturn(app);
226226
User occupier = new User();
227227
occupier.setId("111");
228228
when(userService.queryUserById("555")).thenReturn(occupier);
@@ -245,7 +245,7 @@ void testUpdate() {
245245
App app = new App();
246246
app.setFramework("Vue");
247247
app.setHomePage(1);
248-
when(appMapper.queryAppById(222)).thenReturn(app);
248+
when(appMapper.queryAppById(222, "1")).thenReturn(app);
249249
Page parentInfo = new Page();
250250
parentInfo.setDepth(4);
251251
parentInfo.setIsPage(false);

base/src/test/java/com/tinyengine/it/service/app/impl/v1/AppV1ServiceImplTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ void testAppSchema() throws JsonProcessingException {
119119
Map<String, Object> dataSourceGlobal = JsonUtils.MAPPER.readValue(json, Map.class);
120120
app.setDataSourceGlobal(dataSourceGlobal);
121121

122-
when(appMapper.queryAppById(anyInt())).thenReturn(app);
122+
when(appMapper.queryAppById(anyInt(), anyString())).thenReturn(app);
123123
Page page = new Page();
124124
page.setIsPage(true);
125125
page.setPageContent(new HashMap<>());
@@ -155,7 +155,7 @@ void testMergeEntries() {
155155
void testGetMetaDto() {
156156
App app = new App();
157157
app.setPlatformId(1);
158-
when(appMapper.queryAppById(anyInt())).thenReturn(app);
158+
when(appMapper.queryAppById(anyInt(), anyString())).thenReturn(app);
159159
when(i18nEntryMapper.findI18nEntriesByHostandHostType(anyInt(), anyString())).thenReturn(
160160
Arrays.asList(new I18nEntryDto()));
161161
when(appExtensionMapper.queryAppExtensionByCondition(any(AppExtension.class))).thenReturn(

0 commit comments

Comments
 (0)