Skip to content

Commit fa1b0f1

Browse files
committed
fix: add app template API
1 parent 8589de9 commit fa1b0f1

File tree

4 files changed

+23
-11
lines changed

4 files changed

+23
-11
lines changed

app/src/main/resources/sql/h2/create_permission_table_ddl_2025_1029.sql

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ create table `t_permission_role`
1313
unique index `u_idx_permission_role` (`name`) using btree
1414
) engine = innodb comment = '';
1515

16+
drop table if exists `r_tenant_user`;
17+
CREATE TABLE `r_tenant_user`
18+
(
19+
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键id',
20+
`tenant_id` int NOT NULL COMMENT '租户id',
21+
`user_id` int NOT NULL COMMENT '用户id',
22+
PRIMARY KEY (`id`) USING BTREE,
23+
UNIQUE KEY `u_idx_tenant_user` (`tenant_id`,`user_id`) USING BTREE
24+
) engine = innodb comment = '租户和用户关系表';
25+
1626
drop table if exists `t_auth_users_units_roles`;
1727

1828
create table `t_auth_users_units_roles`
@@ -31,3 +41,4 @@ create table `t_auth_users_units_roles`
3141
primary key (`id`) using btree,
3242
unique index `u_idx_auth_users_units_roles` (`user_id`, `unit_id`, `unit_type`) using btree
3343
) engine = innodb comment = '';
44+

app/src/main/resources/sql/mysql/create_permission_table_ddl_2025_1029.sql

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ create table `t_permission_role`
1313
unique index `u_idx_permission_role` (`name`) using btree
1414
) engine = innodb comment = '';
1515

16+
drop table if exists `r_tenant_user`;
17+
CREATE TABLE `r_tenant_user`
18+
(
19+
`id` int NOT NULL AUTO_INCREMENT COMMENT '主键id',
20+
`tenant_id` int NOT NULL COMMENT '租户id',
21+
`user_id` int NOT NULL COMMENT '用户id',
22+
PRIMARY KEY (`id`) USING BTREE,
23+
UNIQUE KEY `u_idx_tenant_user` (`tenant_id`,`user_id`) USING BTREE
24+
) engine = innodb comment = '租户和用户关系表';
25+
1626
drop table if exists `t_auth_users_units_roles`;
1727

1828
create table `t_auth_users_units_roles`
@@ -31,3 +41,4 @@ create table `t_auth_users_units_roles`
3141
primary key (`id`) using btree,
3242
unique index `u_idx_auth_users_units_roles` (`user_id`, `unit_id`, `unit_type`) using btree
3343
) engine = innodb comment = '';
44+

base/src/main/java/com/tinyengine/it/controller/AppTemplateController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public Result<AppDto> getAllAppTemplateByPage(@RequestParam Integer currentPage,
8282
App app = new App();
8383
app.setName(name);
8484
app.setSceneId(sceneId);
85-
app.setId(industryId);
85+
app.setIndustryId(industryId);
8686
app.setFramework(framework);
8787
app.setCreatedBy(createBy);
8888
AppDto appDto = appTemplateService.queryAllAppTemplate(currentPage, pageSize, orderBy, app);

base/src/main/resources/mappers/PageMapper.xml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,6 @@
176176
<result column="username" property="username"/>
177177
<result column="email" property="email"/>
178178
<result column="enable" property="isEnable"/>
179-
<result column="userCreatedBy" property="createdBy"/>
180-
<result column="userLastUpdatedBy" property="lastUpdatedBy"/>
181179
<result column="userCreatedTime" property="createdTime"/>
182180
<result column="userLastUpdatedTime" property="lastUpdatedTime"/>
183181
<result column="userTenantId" property="tenantId"/>
@@ -232,12 +230,8 @@
232230
U.username,
233231
U.email,
234232
U.enable,
235-
U.created_by AS userCreatedBy,
236-
U.last_updated_by AS userLastUpdatedBy,
237233
U.created_time AS userCreatedTime,
238234
U.last_updated_time AS userLastUpdatedTime,
239-
U.tenant_id AS userTenantId,
240-
U.site_id AS userSiteId,
241235
U.is_admin
242236
FROM t_page P
243237
LEFT JOIN t_user U ON P.occupier_by = U.id
@@ -273,12 +267,8 @@
273267
U.username,
274268
U.email,
275269
U.enable,
276-
U.created_by AS userCreatedBy,
277-
U.last_updated_by AS userLastUpdatedBy,
278270
U.created_time AS userCreatedTime,
279271
U.last_updated_time AS userLastUpdatedTime,
280-
U.tenant_id AS userTenantId,
281-
U.site_id AS userSiteId,
282272
U.is_admin
283273
FROM t_page P
284274
LEFT JOIN t_user U ON P.occupier_by = U.id

0 commit comments

Comments
 (0)