浏览代码

@IPU_REQ_2022@添加生成镜像所需插件和Dockerfile;将已经配置好的数据模板和业务控制流都加载到服务逻辑流中。

ipuread 2 年之前
父节点
当前提交
14a39ca293

+ 12 - 0
qb-auth-server/Dockerfile

1
FROM openjdk:8-jdk-alpine
2
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
3
RUN adduser -D -h /ipu ipu
4
USER ipu
5
WORKDIR /ipu
6
ENV JVM_PARAM  " "
7
ARG JAR_FILE
8
ADD ${JAR_FILE}-bin.tar.gz .
9
ARG JAR_NAME
10
ENV DOCKER_JAR_NAME=$JAR_NAME
11
EXPOSE 8080
12
ENTRYPOINT java ${JVM_PARAM} -Dfile.encoding=utf-8 -Djava.security.egd=file:/dev/./urandom -jar ./$DOCKER_JAR_NAME/$DOCKER_JAR_NAME.jar $0 $@

+ 2 - 2
qb-auth-server/pom.xml

166
            </plugin>
166
            </plugin>
167
167
168
            <!-- 添加docker镜像功能 -->
168
            <!-- 添加docker镜像功能 -->
169
            <!--<plugin>
169
            <plugin>
170
                <groupId>com.spotify</groupId>
170
                <groupId>com.spotify</groupId>
171
                <artifactId>dockerfile-maven-plugin</artifactId>
171
                <artifactId>dockerfile-maven-plugin</artifactId>
172
            </plugin>-->
172
            </plugin>
173
        </plugins>
173
        </plugins>
174
    </build>
174
    </build>
175
</project>
175
</project>

+ 16 - 16
qb-auth-server/sql/系统权限管理v1.4.1.sql

25
/*==============================================================*/
25
/*==============================================================*/
26
create table sec_menu
26
create table sec_menu
27
(
27
(
28
   MENU_ID              bigint(20) not null auto_increment comment '菜单标识',
28
   MENU_ID              bigint(20) not null  comment '菜单标识',
29
   PARENT_MENU_ID       bigint(20) default NULL comment '上级菜单标识',
29
   PARENT_MENU_ID       bigint(20) default NULL comment '上级菜单标识',
30
   SUB_COUNT            int(5) default NULL comment '子菜单数目',
30
   SUB_COUNT            int(5) default NULL comment '子菜单数目',
31
   MENU_TYPE            varchar(3),
31
   MENU_TYPE            varchar(3),
55
   TENANT_CODE          varchar(32),
55
   TENANT_CODE          varchar(32),
56
   primary key (MENU_ID)
56
   primary key (MENU_ID)
57
)
57
)
58
ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
58
ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
59
59
60
/*==============================================================*/
60
/*==============================================================*/
61
/* Table: sec_org_user_rel                                      */
61
/* Table: sec_org_user_rel                                      */
62
/*==============================================================*/
62
/*==============================================================*/
63
create table sec_org_user_rel
63
create table sec_org_user_rel
64
(
64
(
65
   ORG_USER_REL_ID      bigint(20) not null auto_increment comment '用户组织关系标识',
65
   ORG_USER_REL_ID      bigint(20) not null  comment '用户组织关系标识',
66
   ORGANIZE_ID          bigint(20) default NULL comment '组织标识',
66
   ORGANIZE_ID          bigint(20) default NULL comment '组织标识',
67
   USER_ID              bigint(20) default NULL comment '用户标识',
67
   USER_ID              bigint(20) default NULL comment '用户标识',
68
   VALID_DATE           datetime default NULL comment '生效日期',
68
   VALID_DATE           datetime default NULL comment '生效日期',
81
   TENANT_CODE          varchar(32),
81
   TENANT_CODE          varchar(32),
82
   primary key (ORG_USER_REL_ID)
82
   primary key (ORG_USER_REL_ID)
83
)
83
)
84
ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
84
ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
85
85
86
/*==============================================================*/
86
/*==============================================================*/
87
/* Table: sec_organize                                          */
87
/* Table: sec_organize                                          */
88
/*==============================================================*/
88
/*==============================================================*/
89
create table sec_organize
89
create table sec_organize
90
(
90
(
91
   ORGANIZE_ID          bigint(20) not null auto_increment comment '组织标识',
91
   ORGANIZE_ID          bigint(20) not null  comment '组织标识',
92
   ORGANIZE_TYPE        varchar(3),
92
   ORGANIZE_TYPE        varchar(3),
93
   PARTY_ID             bigint(20) default NULL comment '参与人标识',
93
   PARTY_ID             bigint(20) default NULL comment '参与人标识',
94
   ORGANIZE_NAME        varchar(200),
94
   ORGANIZE_NAME        varchar(200),
139
   TENANT_CODE          varchar(32),
139
   TENANT_CODE          varchar(32),
140
   primary key (ORGANIZE_ID)
140
   primary key (ORGANIZE_ID)
141
)
141
)
142
ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
142
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
143
143
144
/*==============================================================*/
144
/*==============================================================*/
145
/* Table: sec_priv_entity                                       */
145
/* Table: sec_priv_entity                                       */
146
/*==============================================================*/
146
/*==============================================================*/
147
create table sec_priv_entity
147
create table sec_priv_entity
148
(
148
(
149
   PRIV_ENT_ID          bigint(20) not null auto_increment comment '权限实体标识',
149
   PRIV_ENT_ID          bigint(20) not null comment '权限实体标识',
150
   PRIV_ENT_NAME        varchar(255),
150
   PRIV_ENT_NAME        varchar(255),
151
   PRIV_ENT_CODE        varchar(255),
151
   PRIV_ENT_CODE        varchar(255),
152
   APP_ID               bigint(20) default NULL comment '使用系统标识',
152
   APP_ID               bigint(20) default NULL comment '使用系统标识',
171
   TENANT_CODE          varchar(32),
171
   TENANT_CODE          varchar(32),
172
   primary key (PRIV_ENT_ID)
172
   primary key (PRIV_ENT_ID)
173
)
173
)
174
ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
174
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
175
175
176
/*==============================================================*/
176
/*==============================================================*/
177
/* Table: sec_role                                              */
177
/* Table: sec_role                                              */
178
/*==============================================================*/
178
/*==============================================================*/
179
create table sec_role
179
create table sec_role
180
(
180
(
181
   ROLE_ID              bigint(20) not null auto_increment comment '角色标识',
181
   ROLE_ID              bigint(20) not null comment '角色标识',
182
   JOB_ID               bigint(20) default NULL comment '岗位标识',
182
   JOB_ID               bigint(20) default NULL comment '岗位标识',
183
   ROLE_NAME            varchar(256),
183
   ROLE_NAME            varchar(256),
184
   ROLE_TYPE            varchar(3),
184
   ROLE_TYPE            varchar(3),
200
   TENANT_CODE          varchar(32),
200
   TENANT_CODE          varchar(32),
201
   primary key (ROLE_ID)
201
   primary key (ROLE_ID)
202
)
202
)
203
ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
203
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
204
204
205
/*==============================================================*/
205
/*==============================================================*/
206
/* Table: sec_role_grant                                        */
206
/* Table: sec_role_grant                                        */
207
/*==============================================================*/
207
/*==============================================================*/
208
create table sec_role_grant
208
create table sec_role_grant
209
(
209
(
210
   ROLE_GRANT_ID        bigint(20) not null auto_increment comment '角色授权标识',
210
   ROLE_GRANT_ID        bigint(20) not null comment '角色授权标识',
211
   ROLE_ID              bigint(20) default NULL comment '角色标识',
211
   ROLE_ID              bigint(20) default NULL comment '角色标识',
212
   PRIV_ENT_ID          bigint(20) default NULL comment '实体标识',
212
   PRIV_ENT_ID          bigint(20) default NULL comment '实体标识',
213
   REMARK               varchar(100),
213
   REMARK               varchar(100),
227
   TENANT_CODE          varchar(32),
227
   TENANT_CODE          varchar(32),
228
   primary key (ROLE_GRANT_ID)
228
   primary key (ROLE_GRANT_ID)
229
)
229
)
230
ENGINE=InnoDB AUTO_INCREMENT=1002 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
230
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
231
231
232
/*==============================================================*/
232
/*==============================================================*/
233
/* Table: sec_role_user_rel                                     */
233
/* Table: sec_role_user_rel                                     */
234
/*==============================================================*/
234
/*==============================================================*/
235
create table sec_role_user_rel
235
create table sec_role_user_rel
236
(
236
(
237
   ROLE_USER_REL_ID     bigint(20) not null auto_increment comment '角色关联用户标识',
237
   ROLE_USER_REL_ID     bigint(20) not null comment '角色关联用户标识',
238
   USER_ID              bigint(20) not null comment '用户标识',
238
   USER_ID              bigint(20) not null comment '用户标识',
239
   ROLE_ID              bigint(20) not null comment '角色标识',
239
   ROLE_ID              bigint(20) not null comment '角色标识',
240
   VALID_DATE           datetime default NULL comment '生效日期',
240
   VALID_DATE           datetime default NULL comment '生效日期',
253
   TENANT_CODE          varchar(32),
253
   TENANT_CODE          varchar(32),
254
   primary key (ROLE_USER_REL_ID)
254
   primary key (ROLE_USER_REL_ID)
255
)
255
)
256
ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
256
ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
257
257
258
/*==============================================================*/
258
/*==============================================================*/
259
/* Table: sec_user                                              */
259
/* Table: sec_user                                              */
260
/*==============================================================*/
260
/*==============================================================*/
261
create table sec_user
261
create table sec_user
262
(
262
(
263
   USER_ID              bigint(20) not null auto_increment comment '用户标识',
263
   USER_ID              bigint(20) not null  comment '用户标识',
264
   NICK_NAME            varchar(256),
264
   NICK_NAME            varchar(256),
265
   USER_ACCOUNT         varchar(500),
265
   USER_ACCOUNT         varchar(500),
266
   GENDER               varchar(2),
266
   GENDER               varchar(2),
290
   SURNAME              varchar(500),
290
   SURNAME              varchar(500),
291
   primary key (USER_ID)
291
   primary key (USER_ID)
292
)
292
)
293
ENGINE=InnoDB AUTO_INCREMENT=1482980362203303937 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
293
ENGINE=InnoDB  DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
294
294

+ 41 - 2
qb-auth-server/src/main/java/com/ipu/logicflow/server/util/LogicFlowConfig.java

43
	public static void initModel() {
43
	public static void initModel() {
44
		modelPathMap.put("sec_user", "flow/user/model/sec_user.xml");
44
		modelPathMap.put("sec_user", "flow/user/model/sec_user.xml");
45
		modelPathMap.put("sec_organize", "flow/org/model/sec_organize.xml");
45
		modelPathMap.put("sec_organize", "flow/org/model/sec_organize.xml");
46
		//modelPathMap.put("sec_org_user_rel", "flow/org/model/sec_org_user_rel.xml");
46
		modelPathMap.put("sec_org_user_rel", "flow/org/model/sec_org_user_rel.xml");
47
		modelPathMap.put("sec_menu", "flow/menu/model/sec_menu.xml");
48
		modelPathMap.put("sec_priv_entity", "flow/menu/model/sec_priv_entity.xml");
49
		modelPathMap.put("sec_role_grant", "flow/role/model/sec_role_grant.xml");
50
		modelPathMap.put("sec_user_rel", "flow/role/model/sec_user_rel.xml");
51
		modelPathMap.put("sec_role", "flow/role/model/sec_role.xml");
47
		Iterator<String> it = modelPathMap.values().iterator();
52
		Iterator<String> it = modelPathMap.values().iterator();
48
		while (it.hasNext()) {
53
		while (it.hasNext()) {
49
			LogicFlowUtil.loadLogicModel(it.next());
54
			LogicFlowUtil.loadLogicModel(it.next());
62
67
63
		
68
		
64
		flowPathMap.put("organize_select", "flow/org/organize_select.xml");
69
		flowPathMap.put("organize_select", "flow/org/organize_select.xml");
65
70
		flowPathMap.put("organize_select_by_name", "flow/org/organize_select_by_name.xml");
71
		flowPathMap.put("organize_insert", "flow/org/organize_insert.xml");
72
		flowPathMap.put("organize_update", "flow/org/organize_update.xml");
73
		flowPathMap.put("dept_org_user_select", "flow/org/dept_org_user_select.xml");
74
		flowPathMap.put("org_user_rel_combine_select", "flow/org/org_user_rel_combine_select.xml");
75
		flowPathMap.put("org_user_rel_delete_by_cond", "flow/org/org_user_rel_delete_by_cond.xml");
76
		flowPathMap.put("org_user_rel_delete", "flow/org/org_user_rel_delete.xml");
77
		flowPathMap.put("org_user_rel_insert", "flow/org/org_user_rel_insert.xml");
78
		flowPathMap.put("org_user_rel_select_by_cond", "flow/org/org_user_rel_select_by_cond.xml");
79
		flowPathMap.put("org_user_rel_select_by_org_id", "flow/org/org_user_rel_select_by_org_id.xml");
80
		flowPathMap.put("org_user_rel_select", "flow/org/org_user_rel_select.xml");
81
		
82
		flowPathMap.put("aggregate_menu_select", "flow/menu/aggregate_menu_select.xml");
83
		flowPathMap.put("aggregate_priv_entity_select", "flow/menu/aggregate_priv_entity_select.xml");
84
		flowPathMap.put("menu_delete_by_cond", "flow/menu/menu_delete_by_cond.xml");
85
		flowPathMap.put("menu_insert", "flow/menu/menu_insert.xml");
86
		flowPathMap.put("menu_select", "flow/menu/menu_select.xml");
87
		flowPathMap.put("menu_update_by_cond", "flow/menu/menu_update_by_cond.xml");
88
		flowPathMap.put("priv_entity_delete", "flow/menu/priv_entity_delete.xml");
89
		flowPathMap.put("priv_entity_insert", "flow/menu/priv_entity_insert.xml");
90
		flowPathMap.put("priv_entity_update_by_cond", "flow/menu/priv_entity_update_by_cond.xml");
91
		flowPathMap.put("priv_entity_update_menu_by_cond", "flow/menu/priv_entity_update_menu_by_cond.xml");
92
		
93
		flowPathMap.put("role_delete", "flow/role/role_delete.xml");
94
		flowPathMap.put("role_grant_delete", "flow/role/role_grant_delete.xml");
95
		flowPathMap.put("role_grant_insert", "flow/role/role_grant_insert.xml");
96
		flowPathMap.put("role_grant_select", "flow/role/role_grant_select.xml");
97
		flowPathMap.put("role_grant_update_by_cond", "flow/role/role_grant_update_by_cond.xml");
98
		flowPathMap.put("role_insert", "flow/role/role_insert.xml");
99
		flowPathMap.put("role_select", "flow/role/role_select.xml");
100
		flowPathMap.put("role_update_by_cond", "flow/role/role_update_by_cond.xml");
101
		flowPathMap.put("role_user_rel_delete_by_cond", "flow/role/role_user_rel_delete_by_cond.xml");
102
		flowPathMap.put("role_user_rel_insert", "flow/role/role_user_rel_insert.xml");
103
		flowPathMap.put("role_user_rel_select_by_cond", "flow/role/role_user_rel_select_by_cond.xml");
104
		
66
		Iterator<String> it = flowPathMap.values().iterator();
105
		Iterator<String> it = flowPathMap.values().iterator();
67
		while (it.hasNext()) {
106
		while (it.hasNext()) {
68
			LogicFlowUtil.loadLogicFlow(it.next());
107
			LogicFlowUtil.loadLogicFlow(it.next());

+ 1 - 1
qb-auth-server/src/main/resources/dev/ipu-mybatis-config.xml

13
        <!-- 分页插件,可根据参数定制化 -->
13
        <!-- 分页插件,可根据参数定制化 -->
14
	    <plugin interceptor="com.github.pagehelper.PageInterceptor"></plugin>
14
	    <plugin interceptor="com.github.pagehelper.PageInterceptor"></plugin>
15
	</plugins>
15
	</plugins>
16
	<environments default="test">
16
	<environments default="auth">
17
		<environment id="auth">
17
		<environment id="auth">
18
			<transactionManager type="jdbc" />
18
			<transactionManager type="jdbc" />
19
			<dataSource type="com.ai.ipu.database.datasource.DruidDataSourceFactory">
19
			<dataSource type="com.ai.ipu.database.datasource.DruidDataSourceFactory">