Quellcode durchsuchen

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

ipuread vor 2 Jahren
Ursprung
Commit
14a39ca293

+ 12 - 0
qb-auth-server/Dockerfile

@ -0,0 +1,12 @@
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,10 +166,10 @@
166 166
            </plugin>
167 167
168 168
            <!-- 添加docker镜像功能 -->
169
            <!--<plugin>
169
            <plugin>
170 170
                <groupId>com.spotify</groupId>
171 171
                <artifactId>dockerfile-maven-plugin</artifactId>
172
            </plugin>-->
172
            </plugin>
173 173
        </plugins>
174 174
    </build>
175 175
</project>

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

@ -25,7 +25,7 @@ drop table if exists sec_user;
25 25
/*==============================================================*/
26 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 29
   PARENT_MENU_ID       bigint(20) default NULL comment '上级菜单标识',
30 30
   SUB_COUNT            int(5) default NULL comment '子菜单数目',
31 31
   MENU_TYPE            varchar(3),
@ -55,14 +55,14 @@ create table sec_menu
55 55
   TENANT_CODE          varchar(32),
56 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 61
/* Table: sec_org_user_rel                                      */
62 62
/*==============================================================*/
63 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 66
   ORGANIZE_ID          bigint(20) default NULL comment '组织标识',
67 67
   USER_ID              bigint(20) default NULL comment '用户标识',
68 68
   VALID_DATE           datetime default NULL comment '生效日期',
@ -81,14 +81,14 @@ create table sec_org_user_rel
81 81
   TENANT_CODE          varchar(32),
82 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 87
/* Table: sec_organize                                          */
88 88
/*==============================================================*/
89 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 92
   ORGANIZE_TYPE        varchar(3),
93 93
   PARTY_ID             bigint(20) default NULL comment '参与人标识',
94 94
   ORGANIZE_NAME        varchar(200),
@ -139,14 +139,14 @@ create table sec_organize
139 139
   TENANT_CODE          varchar(32),
140 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 145
/* Table: sec_priv_entity                                       */
146 146
/*==============================================================*/
147 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 150
   PRIV_ENT_NAME        varchar(255),
151 151
   PRIV_ENT_CODE        varchar(255),
152 152
   APP_ID               bigint(20) default NULL comment '使用系统标识',
@ -171,14 +171,14 @@ create table sec_priv_entity
171 171
   TENANT_CODE          varchar(32),
172 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 177
/* Table: sec_role                                              */
178 178
/*==============================================================*/
179 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 182
   JOB_ID               bigint(20) default NULL comment '岗位标识',
183 183
   ROLE_NAME            varchar(256),
184 184
   ROLE_TYPE            varchar(3),
@ -200,14 +200,14 @@ create table sec_role
200 200
   TENANT_CODE          varchar(32),
201 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 206
/* Table: sec_role_grant                                        */
207 207
/*==============================================================*/
208 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 211
   ROLE_ID              bigint(20) default NULL comment '角色标识',
212 212
   PRIV_ENT_ID          bigint(20) default NULL comment '实体标识',
213 213
   REMARK               varchar(100),
@ -227,14 +227,14 @@ create table sec_role_grant
227 227
   TENANT_CODE          varchar(32),
228 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 233
/* Table: sec_role_user_rel                                     */
234 234
/*==============================================================*/
235 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 238
   USER_ID              bigint(20) not null comment '用户标识',
239 239
   ROLE_ID              bigint(20) not null comment '角色标识',
240 240
   VALID_DATE           datetime default NULL comment '生效日期',
@ -253,14 +253,14 @@ create table sec_role_user_rel
253 253
   TENANT_CODE          varchar(32),
254 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 259
/* Table: sec_user                                              */
260 260
/*==============================================================*/
261 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 264
   NICK_NAME            varchar(256),
265 265
   USER_ACCOUNT         varchar(500),
266 266
   GENDER               varchar(2),
@ -290,5 +290,5 @@ create table sec_user
290 290
   SURNAME              varchar(500),
291 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,7 +43,12 @@ public class LogicFlowConfig {
43 43
	public static void initModel() {
44 44
		modelPathMap.put("sec_user", "flow/user/model/sec_user.xml");
45 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 52
		Iterator<String> it = modelPathMap.values().iterator();
48 53
		while (it.hasNext()) {
49 54
			LogicFlowUtil.loadLogicModel(it.next());
@ -62,7 +67,41 @@ public class LogicFlowConfig {
62 67
63 68
		
64 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 105
		Iterator<String> it = flowPathMap.values().iterator();
67 106
		while (it.hasNext()) {
68 107
			LogicFlowUtil.loadLogicFlow(it.next());

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

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