Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
c4695206
Commit
c4695206
authored
Nov 05, 2021
by
季圣华
Browse files
给用户/角色/模块关系表增加租户字段
parent
69742cf3
Changes
8
Hide whitespace changes
Inline
Side-by-side
jshERP-boot/docs/jsh_erp.sql
View file @
c4695206
/*
/*
Navicat MySQL Data Transfer
Navicat MySQL Data Transfer
Source Server :
127.0.0.1
Source Server :
localhost
Source Server Version : 507
04
Source Server Version : 507
26
Source Host : 127.0.0.1:3306
Source Host : 127.0.0.1:3306
Source Database : jsh_erp
Source Database : jsh_erp
Target Server Type : MYSQL
Target Server Type : MYSQL
Target Server Version : 507
04
Target Server Version : 507
26
File Encoding : 65001
File Encoding : 65001
Date: 2021-1
0-29 18:44:03
Date: 2021-1
1-05 17:33:50
*/
*/
SET
FOREIGN_KEY_CHECKS
=
0
;
SET
FOREIGN_KEY_CHECKS
=
0
;
...
@@ -919,6 +919,7 @@ CREATE TABLE `jsh_user_business` (
...
@@ -919,6 +919,7 @@ CREATE TABLE `jsh_user_business` (
`key_id`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'主id'
,
`key_id`
varchar
(
50
)
DEFAULT
NULL
COMMENT
'主id'
,
`value`
varchar
(
10000
)
DEFAULT
NULL
COMMENT
'值'
,
`value`
varchar
(
10000
)
DEFAULT
NULL
COMMENT
'值'
,
`btn_str`
varchar
(
2000
)
DEFAULT
NULL
COMMENT
'按钮权限'
,
`btn_str`
varchar
(
2000
)
DEFAULT
NULL
COMMENT
'按钮权限'
,
`tenant_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'租户id'
,
`delete_flag`
varchar
(
1
)
DEFAULT
'0'
COMMENT
'删除标记,0未删除,1删除'
,
`delete_flag`
varchar
(
1
)
DEFAULT
'0'
COMMENT
'删除标记,0未删除,1删除'
,
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
83
DEFAULT
CHARSET
=
utf8
COMMENT
=
'用户/角色/模块关系表'
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
83
DEFAULT
CHARSET
=
utf8
COMMENT
=
'用户/角色/模块关系表'
;
...
@@ -926,43 +927,43 @@ CREATE TABLE `jsh_user_business` (
...
@@ -926,43 +927,43 @@ CREATE TABLE `jsh_user_business` (
-- ----------------------------
-- ----------------------------
-- Records of jsh_user_business
-- Records of jsh_user_business
-- ----------------------------
-- ----------------------------
INSERT
INTO
`jsh_user_business`
VALUES
(
'5'
,
'RoleFunctions'
,
'4'
,
'[210][225][211][241][32][33][199][242][38][41][200][201][239][202][40][232][233][197][44][203][204][205][206][212][246][207][208][209][226][227][228][229][59][235][237][244][22][21][23][220][240][247][25][24][217][218][26][194][195][31][13][1][14][243][15][234][16][18][236][245][248][198]'
,
'[{
\"
funId
\"
:13,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:14,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:243,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:234,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:16,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:18,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:236,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:245,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:22,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:23,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:220,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:240,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:247,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:25,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:217,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:218,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:26,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:194,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:195,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:31,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:241,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:33,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:199,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:242,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:41,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:200,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:210,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:211,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:197,
\"
btnStr
\"
:
\"
1,7,2
\"
},{
\"
funId
\"
:203,
\"
btnStr
\"
:
\"
1,7,2
\"
},{
\"
funId
\"
:204,
\"
btnStr
\"
:
\"
1,7,2
\"
},{
\"
funId
\"
:205,
\"
btnStr
\"
:
\"
1,7,2
\"
},{
\"
funId
\"
:206,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:212,
\"
btnStr
\"
:
\"
1,7,2
\"
},{
\"
funId
\"
:201,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:202,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:40,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:232,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:233,
\"
btnStr
\"
:
\"
1,2,7
\"
}]'
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'5'
,
'RoleFunctions'
,
'4'
,
'[210][225][211][241][32][33][199][242][38][41][200][201][239][202][40][232][233][197][44][203][204][205][206][212][246][207][208][209][226][227][228][229][59][235][237][244][22][21][23][220][240][247][25][24][217][218][26][194][195][31][13][1][14][243][15][234][16][18][236][245][248][198]'
,
'[{
\"
funId
\"
:13,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:14,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:243,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:234,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:16,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:18,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:236,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:245,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:22,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:23,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:220,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:240,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:247,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:25,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:217,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:218,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:26,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:194,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:195,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:31,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:241,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:33,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:199,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:242,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:41,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:200,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:210,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:211,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:197,
\"
btnStr
\"
:
\"
1,7,2
\"
},{
\"
funId
\"
:203,
\"
btnStr
\"
:
\"
1,7,2
\"
},{
\"
funId
\"
:204,
\"
btnStr
\"
:
\"
1,7,2
\"
},{
\"
funId
\"
:205,
\"
btnStr
\"
:
\"
1,7,2
\"
},{
\"
funId
\"
:206,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:212,
\"
btnStr
\"
:
\"
1,7,2
\"
},{
\"
funId
\"
:201,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:202,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:40,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:232,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:233,
\"
btnStr
\"
:
\"
1,2,7
\"
}]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'6'
,
'RoleFunctions'
,
'5'
,
'[22][23][25][26][194][195][31][33][200][201][41][199][202]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'6'
,
'RoleFunctions'
,
'5'
,
'[22][23][25][26][194][195][31][33][200][201][41][199][202]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'7'
,
'RoleFunctions'
,
'6'
,
'[22][23][220][240][25][217][218][26][194][195][31][59][207][208][209][226][227][228][229][235][237][210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212]'
,
'[{
\"
funId
\"
:
\"
33
\"
,
\"
btnStr
\"
:
\"
4
\"
}]'
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'7'
,
'RoleFunctions'
,
'6'
,
'[22][23][220][240][25][217][218][26][194][195][31][59][207][208][209][226][227][228][229][235][237][210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212]'
,
'[{
\"
funId
\"
:
\"
33
\"
,
\"
btnStr
\"
:
\"
4
\"
}]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'9'
,
'RoleFunctions'
,
'7'
,
'[168][13][12][16][14][15][189][18][19][132]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'9'
,
'RoleFunctions'
,
'7'
,
'[168][13][12][16][14][15][189][18][19][132]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'10'
,
'RoleFunctions'
,
'8'
,
'[168][13][12][16][14][15][189][18][19][132][22][23][25][26][27][157][158][155][156][125][31][127][126][128][33][34][35][36][37][39][40][41][42][43][46][47][48][49][50][51][52][53][54][55][56][57][192][59][60][61][62][63][65][66][68][69][70][71][73][74][76][77][79][191][81][82][83][85][89][161][86][176][165][160][28][134][91][92][29][94][95][97][104][99][100][101][102][105][107][108][110][111][113][114][116][117][118][120][121][131][135][123][122][20][130][146][147][138][148][149][153][140][145][184][152][143][170][171][169][166][167][163][164][172][173][179][178][181][182][183][186][187][247]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'10'
,
'RoleFunctions'
,
'8'
,
'[168][13][12][16][14][15][189][18][19][132][22][23][25][26][27][157][158][155][156][125][31][127][126][128][33][34][35][36][37][39][40][41][42][43][46][47][48][49][50][51][52][53][54][55][56][57][192][59][60][61][62][63][65][66][68][69][70][71][73][74][76][77][79][191][81][82][83][85][89][161][86][176][165][160][28][134][91][92][29][94][95][97][104][99][100][101][102][105][107][108][110][111][113][114][116][117][118][120][121][131][135][123][122][20][130][146][147][138][148][149][153][140][145][184][152][143][170][171][169][166][167][163][164][172][173][179][178][181][182][183][186][187][247]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'11'
,
'RoleFunctions'
,
'9'
,
'[168][13][12][16][14][15][189][18][19][132][22][23][25][26][27][157][158][155][156][125][31][127][126][128][33][34][35][36][37][39][40][41][42][43][46][47][48][49][50][51][52][53][54][55][56][57][192][59][60][61][62][63][65][66][68][69][70][71][73][74][76][77][79][191][81][82][83][85][89][161][86][176][165][160][28][134][91][92][29][94][95][97][104][99][100][101][102][105][107][108][110][111][113][114][116][117][118][120][121][131][135][123][122][20][130][146][147][138][148][149][153][140][145][184][152][143][170][171][169][166][167][163][164][172][173][179][178][181][182][183][186][187][188]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'11'
,
'RoleFunctions'
,
'9'
,
'[168][13][12][16][14][15][189][18][19][132][22][23][25][26][27][157][158][155][156][125][31][127][126][128][33][34][35][36][37][39][40][41][42][43][46][47][48][49][50][51][52][53][54][55][56][57][192][59][60][61][62][63][65][66][68][69][70][71][73][74][76][77][79][191][81][82][83][85][89][161][86][176][165][160][28][134][91][92][29][94][95][97][104][99][100][101][102][105][107][108][110][111][113][114][116][117][118][120][121][131][135][123][122][20][130][146][147][138][148][149][153][140][145][184][152][143][170][171][169][166][167][163][164][172][173][179][178][181][182][183][186][187][188]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'12'
,
'UserRole'
,
'1'
,
'[5]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'12'
,
'UserRole'
,
'1'
,
'[5]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'13'
,
'UserRole'
,
'2'
,
'[6][7]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'13'
,
'UserRole'
,
'2'
,
'[6][7]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'14'
,
'UserDepot'
,
'2'
,
'[1][2][6][7]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'14'
,
'UserDepot'
,
'2'
,
'[1][2][6][7]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'15'
,
'UserDepot'
,
'1'
,
'[1][2][5][6][7][10][12][14][15][17]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'15'
,
'UserDepot'
,
'1'
,
'[1][2][5][6][7][10][12][14][15][17]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'16'
,
'UserRole'
,
'63'
,
'[10]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'16'
,
'UserRole'
,
'63'
,
'[10]'
,
null
,
'63'
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'18'
,
'UserDepot'
,
'63'
,
'[14][15]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'18'
,
'UserDepot'
,
'63'
,
'[14][15]'
,
null
,
'63'
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'19'
,
'UserDepot'
,
'5'
,
'[6][45][46][50]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'19'
,
'UserDepot'
,
'5'
,
'[6][45][46][50]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'20'
,
'UserRole'
,
'5'
,
'[5]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'20'
,
'UserRole'
,
'5'
,
'[5]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'21'
,
'UserRole'
,
'64'
,
'[13]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'21'
,
'UserRole'
,
'64'
,
'[13]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'22'
,
'UserDepot'
,
'64'
,
'[1]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'22'
,
'UserDepot'
,
'64'
,
'[1]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'23'
,
'UserRole'
,
'65'
,
'[5]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'23'
,
'UserRole'
,
'65'
,
'[5]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'24'
,
'UserDepot'
,
'65'
,
'[1]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'24'
,
'UserDepot'
,
'65'
,
'[1]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'25'
,
'UserCustomer'
,
'64'
,
'[5][2]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'25'
,
'UserCustomer'
,
'64'
,
'[5][2]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'26'
,
'UserCustomer'
,
'65'
,
'[6]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'26'
,
'UserCustomer'
,
'65'
,
'[6]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'27'
,
'UserCustomer'
,
'63'
,
'[58]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'27'
,
'UserCustomer'
,
'63'
,
'[58]'
,
null
,
'63'
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'28'
,
'UserDepot'
,
'96'
,
'[7]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'28'
,
'UserDepot'
,
'96'
,
'[7]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'29'
,
'UserRole'
,
'96'
,
'[6]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'29'
,
'UserRole'
,
'96'
,
'[6]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'30'
,
'UserRole'
,
'113'
,
'[10]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'30'
,
'UserRole'
,
'113'
,
'[10]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'32'
,
'RoleFunctions'
,
'10'
,
'[210][225][211][241][32][33][199][242][38][41][200][201][239][202][40][232][233][197][44][203][204][205][206][212][246][207][208][209][226][227][228][229][59][235][237][244][22][21][23][220][240][247][25][24][217][218][26][194][195][31][13][14][243][15][234][248][198]'
,
'[{
\"
funId
\"
:13,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:14,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:243,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:234,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:22,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:23,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:220,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:240,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:247,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:25,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:217,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:218,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:26,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:194,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:195,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:31,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:241,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:33,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:199,
\"
btnStr
\"
:
\"
1,7,2
\"
},{
\"
funId
\"
:242,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:41,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:200,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:210,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:211,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:197,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:203,
\"
btnStr
\"
:
\"
1,7,2
\"
},{
\"
funId
\"
:204,
\"
btnStr
\"
:
\"
1,7,2
\"
},{
\"
funId
\"
:205,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:206,
\"
btnStr
\"
:
\"
1,7,2
\"
},{
\"
funId
\"
:212,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:201,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:202,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:40,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:232,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:233,
\"
btnStr
\"
:
\"
1,2,7
\"
}]'
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'32'
,
'RoleFunctions'
,
'10'
,
'[210][225][211][241][32][33][199][242][38][41][200][201][239][202][40][232][233][197][44][203][204][205][206][212][246][207][208][209][226][227][228][229][59][235][237][244][22][21][23][220][240][247][25][24][217][218][26][194][195][31][13][14][243][15][234][248][198]'
,
'[{
\"
funId
\"
:13,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:14,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:243,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:234,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:22,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:23,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:220,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:240,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:247,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:25,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:217,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:218,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:26,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:194,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:195,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:31,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:241,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:33,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:199,
\"
btnStr
\"
:
\"
1,7,2
\"
},{
\"
funId
\"
:242,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:41,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:200,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:210,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:211,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:197,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:203,
\"
btnStr
\"
:
\"
1,7,2
\"
},{
\"
funId
\"
:204,
\"
btnStr
\"
:
\"
1,7,2
\"
},{
\"
funId
\"
:205,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:206,
\"
btnStr
\"
:
\"
1,7,2
\"
},{
\"
funId
\"
:212,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:201,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:202,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:40,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:232,
\"
btnStr
\"
:
\"
1,2,7
\"
},{
\"
funId
\"
:233,
\"
btnStr
\"
:
\"
1,2,7
\"
}]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'34'
,
'UserRole'
,
'115'
,
'[10]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'34'
,
'UserRole'
,
'115'
,
'[10]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'35'
,
'UserRole'
,
'117'
,
'[10]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'35'
,
'UserRole'
,
'117'
,
'[10]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'36'
,
'UserDepot'
,
'117'
,
'[8][9]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'36'
,
'UserDepot'
,
'117'
,
'[8][9]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'37'
,
'UserCustomer'
,
'117'
,
'[52]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'37'
,
'UserCustomer'
,
'117'
,
'[52]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'38'
,
'UserRole'
,
'120'
,
'[4]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'38'
,
'UserRole'
,
'120'
,
'[4]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'41'
,
'RoleFunctions'
,
'12'
,
''
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'41'
,
'RoleFunctions'
,
'12'
,
''
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'48'
,
'RoleFunctions'
,
'13'
,
'[59][207][208][209][226][227][228][229][235][237][210][211][241][33][199][242][41][200]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'48'
,
'RoleFunctions'
,
'13'
,
'[59][207][208][209][226][227][228][229][235][237][210][211][241][33][199][242][41][200]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'51'
,
'UserRole'
,
'74'
,
'[10]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'51'
,
'UserRole'
,
'74'
,
'[10]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'52'
,
'UserDepot'
,
'121'
,
'[13]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'52'
,
'UserDepot'
,
'121'
,
'[13]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'54'
,
'UserDepot'
,
'115'
,
'[13]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'54'
,
'UserDepot'
,
'115'
,
'[13]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'56'
,
'UserCustomer'
,
'115'
,
'[56]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'56'
,
'UserCustomer'
,
'115'
,
'[56]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'57'
,
'UserCustomer'
,
'121'
,
'[56]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'57'
,
'UserCustomer'
,
'121'
,
'[56]'
,
null
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'67'
,
'UserRole'
,
'131'
,
'[17]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'67'
,
'UserRole'
,
'131'
,
'[17]'
,
null
,
'63'
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'68'
,
'RoleFunctions'
,
'16'
,
'[210]'
,
null
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'68'
,
'RoleFunctions'
,
'16'
,
'[210]'
,
null
,
'63'
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'69'
,
'RoleFunctions'
,
'17'
,
'[210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212]'
,
'[{
\"
funId
\"
:
\"
241
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
33
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
199
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
242
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
41
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
200
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
210
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
211
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
197
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
203
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
204
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
205
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
206
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
212
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
201
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
202
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
40
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
232
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
233
\"
,
\"
btnStr
\"
:
\"
1,2
\"
}]'
,
'0'
);
INSERT
INTO
`jsh_user_business`
VALUES
(
'69'
,
'RoleFunctions'
,
'17'
,
'[210][211][241][33][199][242][41][200][201][202][40][232][233][197][203][204][205][206][212]'
,
'[{
\"
funId
\"
:
\"
241
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
33
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
199
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
242
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
41
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
200
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
210
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
211
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
197
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
203
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
204
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
205
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
206
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
212
\"
,
\"
btnStr
\"
:
\"
1
\"
},{
\"
funId
\"
:
\"
201
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
202
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
40
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
232
\"
,
\"
btnStr
\"
:
\"
1,2
\"
},{
\"
funId
\"
:
\"
233
\"
,
\"
btnStr
\"
:
\"
1,2
\"
}]'
,
'63'
,
'0'
);
jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt
View file @
c4695206
...
@@ -1285,4 +1285,16 @@ alter table jsh_tenant add remark varchar(500) DEFAULT NULL COMMENT '备注' aft
...
@@ -1285,4 +1285,16 @@ alter table jsh_tenant add remark varchar(500) DEFAULT NULL COMMENT '备注' aft
alter table jsh_material_initial_stock add low_safe_stock decimal(24,6) DEFAULT NULL COMMENT '最低库存数量' after number;
alter table jsh_material_initial_stock add low_safe_stock decimal(24,6) DEFAULT NULL COMMENT '最低库存数量' after number;
alter table jsh_material_initial_stock add high_safe_stock decimal(24,6) DEFAULT NULL COMMENT '最高库存数量' after low_safe_stock;
alter table jsh_material_initial_stock add high_safe_stock decimal(24,6) DEFAULT NULL COMMENT '最高库存数量' after low_safe_stock;
alter table jsh_material add weight decimal(24,6) DEFAULT NULL COMMENT '基础重量(kg)' after expiry_num;
alter table jsh_material add weight decimal(24,6) DEFAULT NULL COMMENT '基础重量(kg)' after expiry_num;
alter table jsh_material drop column safety_stock;
alter table jsh_material drop column safety_stock;
\ No newline at end of file
-- --------------------------------------------------------
-- 时间 2021年11月5日
-- by jishenghua
-- 给用户/角色/模块关系表增加租户字段
-- 给用户/角色/模块关系表的租户字段赋值
-- --------------------------------------------------------
alter table jsh_user_business add tenant_id bigint(20) DEFAULT null COMMENT '租户id' after btn_str;
update jsh_user_business ub left join jsh_user u on ub.key_id=u.id set ub.tenant_id=u.tenant_id
where (ub.type='UserRole' or ub.type='UserDepot' or ub.type='UserCustomer') and u.tenant_id!=0;
update jsh_user_business ub left join jsh_role r on ub.key_id=r.id set ub.tenant_id=r.tenant_id
where (ub.type='RoleFunctions') and r.tenant_id is not null;
\ No newline at end of file
jshERP-boot/src/main/java/com/jsh/erp/controller/UserController.java
View file @
c4695206
...
@@ -317,7 +317,7 @@ public class UserController {
...
@@ -317,7 +317,7 @@ public class UserController {
ExceptionConstants
.
USER_OVER_LIMIT_FAILED_MSG
);
ExceptionConstants
.
USER_OVER_LIMIT_FAILED_MSG
);
}
else
{
}
else
{
UserEx
ue
=
JSONObject
.
parseObject
(
obj
.
toJSONString
(),
UserEx
.
class
);
UserEx
ue
=
JSONObject
.
parseObject
(
obj
.
toJSONString
(),
UserEx
.
class
);
userService
.
addUserAndOrgUserRel
(
ue
);
userService
.
addUserAndOrgUserRel
(
ue
,
request
);
}
}
return
result
;
return
result
;
}
}
...
@@ -332,10 +332,10 @@ public class UserController {
...
@@ -332,10 +332,10 @@ public class UserController {
*/
*/
@PutMapping
(
"/updateUser"
)
@PutMapping
(
"/updateUser"
)
@ResponseBody
@ResponseBody
public
Object
updateUser
(
@RequestBody
JSONObject
obj
)
throws
Exception
{
public
Object
updateUser
(
@RequestBody
JSONObject
obj
,
HttpServletRequest
request
)
throws
Exception
{
JSONObject
result
=
ExceptionConstants
.
standardSuccess
();
JSONObject
result
=
ExceptionConstants
.
standardSuccess
();
UserEx
ue
=
JSONObject
.
parseObject
(
obj
.
toJSONString
(),
UserEx
.
class
);
UserEx
ue
=
JSONObject
.
parseObject
(
obj
.
toJSONString
(),
UserEx
.
class
);
userService
.
updateUserAndOrgUserRel
(
ue
);
userService
.
updateUserAndOrgUserRel
(
ue
,
request
);
return
result
;
return
result
;
}
}
...
...
jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/UserBusiness.java
View file @
c4695206
...
@@ -11,6 +11,8 @@ public class UserBusiness {
...
@@ -11,6 +11,8 @@ public class UserBusiness {
private
String
btnStr
;
private
String
btnStr
;
private
Long
tenantId
;
private
String
deleteFlag
;
private
String
deleteFlag
;
public
Long
getId
()
{
public
Long
getId
()
{
...
@@ -53,6 +55,14 @@ public class UserBusiness {
...
@@ -53,6 +55,14 @@ public class UserBusiness {
this
.
btnStr
=
btnStr
==
null
?
null
:
btnStr
.
trim
();
this
.
btnStr
=
btnStr
==
null
?
null
:
btnStr
.
trim
();
}
}
public
Long
getTenantId
()
{
return
tenantId
;
}
public
void
setTenantId
(
Long
tenantId
)
{
this
.
tenantId
=
tenantId
;
}
public
String
getDeleteFlag
()
{
public
String
getDeleteFlag
()
{
return
deleteFlag
;
return
deleteFlag
;
}
}
...
...
jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/UserBusinessExample.java
View file @
c4695206
...
@@ -444,6 +444,66 @@ public class UserBusinessExample {
...
@@ -444,6 +444,66 @@ public class UserBusinessExample {
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andTenantIdIsNull
()
{
addCriterion
(
"tenant_id is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTenantIdIsNotNull
()
{
addCriterion
(
"tenant_id is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTenantIdEqualTo
(
Long
value
)
{
addCriterion
(
"tenant_id ="
,
value
,
"tenantId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTenantIdNotEqualTo
(
Long
value
)
{
addCriterion
(
"tenant_id <>"
,
value
,
"tenantId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTenantIdGreaterThan
(
Long
value
)
{
addCriterion
(
"tenant_id >"
,
value
,
"tenantId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTenantIdGreaterThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"tenant_id >="
,
value
,
"tenantId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTenantIdLessThan
(
Long
value
)
{
addCriterion
(
"tenant_id <"
,
value
,
"tenantId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTenantIdLessThanOrEqualTo
(
Long
value
)
{
addCriterion
(
"tenant_id <="
,
value
,
"tenantId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTenantIdIn
(
List
<
Long
>
values
)
{
addCriterion
(
"tenant_id in"
,
values
,
"tenantId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTenantIdNotIn
(
List
<
Long
>
values
)
{
addCriterion
(
"tenant_id not in"
,
values
,
"tenantId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTenantIdBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"tenant_id between"
,
value1
,
value2
,
"tenantId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTenantIdNotBetween
(
Long
value1
,
Long
value2
)
{
addCriterion
(
"tenant_id not between"
,
value1
,
value2
,
"tenantId"
);
return
(
Criteria
)
this
;
}
public
Criteria
andDeleteFlagIsNull
()
{
public
Criteria
andDeleteFlagIsNull
()
{
addCriterion
(
"delete_flag is null"
);
addCriterion
(
"delete_flag is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
...
...
jshERP-boot/src/main/java/com/jsh/erp/service/user/UserService.java
View file @
c4695206
...
@@ -411,7 +411,7 @@ public class UserService {
...
@@ -411,7 +411,7 @@ public class UserService {
}
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
void
addUserAndOrgUserRel
(
UserEx
ue
)
throws
Exception
{
public
void
addUserAndOrgUserRel
(
UserEx
ue
,
HttpServletRequest
request
)
throws
Exception
{
if
(
BusinessConstants
.
DEFAULT_MANAGER
.
equals
(
ue
.
getLoginName
()))
{
if
(
BusinessConstants
.
DEFAULT_MANAGER
.
equals
(
ue
.
getLoginName
()))
{
throw
new
BusinessRunTimeException
(
ExceptionConstants
.
USER_NAME_LIMIT_USE_CODE
,
throw
new
BusinessRunTimeException
(
ExceptionConstants
.
USER_NAME_LIMIT_USE_CODE
,
ExceptionConstants
.
USER_NAME_LIMIT_USE_MSG
);
ExceptionConstants
.
USER_NAME_LIMIT_USE_MSG
);
...
@@ -436,7 +436,7 @@ public class UserService {
...
@@ -436,7 +436,7 @@ public class UserService {
ubObj
.
put
(
"type"
,
"UserRole"
);
ubObj
.
put
(
"type"
,
"UserRole"
);
ubObj
.
put
(
"keyid"
,
userId
);
ubObj
.
put
(
"keyid"
,
userId
);
ubObj
.
put
(
"value"
,
"["
+
ue
.
getRoleId
()
+
"]"
);
ubObj
.
put
(
"value"
,
"["
+
ue
.
getRoleId
()
+
"]"
);
userBusinessService
.
insertUserBusiness
(
ubObj
,
null
);
userBusinessService
.
insertUserBusiness
(
ubObj
,
request
);
}
}
if
(
ue
.
getOrgaId
()==
null
){
if
(
ue
.
getOrgaId
()==
null
){
//如果没有选择机构,就不建机构和用户的关联关系
//如果没有选择机构,就不建机构和用户的关联关系
...
@@ -522,7 +522,8 @@ public class UserService {
...
@@ -522,7 +522,8 @@ public class UserService {
JSONArray
ubArr
=
new
JSONArray
();
JSONArray
ubArr
=
new
JSONArray
();
ubArr
.
add
(
manageRoleId
);
ubArr
.
add
(
manageRoleId
);
ubObj
.
put
(
"value"
,
ubArr
.
toString
());
ubObj
.
put
(
"value"
,
ubArr
.
toString
());
userBusinessService
.
insertUserBusiness
(
ubObj
,
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
());
ubObj
.
put
(
"tenantId"
,
ue
.
getId
());
userBusinessService
.
insertUserBusiness
(
ubObj
,
null
);
//创建租户信息
//创建租户信息
JSONObject
tenantObj
=
new
JSONObject
();
JSONObject
tenantObj
=
new
JSONObject
();
tenantObj
.
put
(
"tenantId"
,
ue
.
getId
());
tenantObj
.
put
(
"tenantId"
,
ue
.
getId
());
...
@@ -551,7 +552,7 @@ public class UserService {
...
@@ -551,7 +552,7 @@ public class UserService {
}
}
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
@Transactional
(
value
=
"transactionManager"
,
rollbackFor
=
Exception
.
class
)
public
void
updateUserAndOrgUserRel
(
UserEx
ue
)
throws
Exception
{
public
void
updateUserAndOrgUserRel
(
UserEx
ue
,
HttpServletRequest
request
)
throws
Exception
{
if
(
BusinessConstants
.
DEFAULT_MANAGER
.
equals
(
ue
.
getLoginName
()))
{
if
(
BusinessConstants
.
DEFAULT_MANAGER
.
equals
(
ue
.
getLoginName
()))
{
throw
new
BusinessRunTimeException
(
ExceptionConstants
.
USER_NAME_LIMIT_USE_CODE
,
throw
new
BusinessRunTimeException
(
ExceptionConstants
.
USER_NAME_LIMIT_USE_CODE
,
ExceptionConstants
.
USER_NAME_LIMIT_USE_MSG
);
ExceptionConstants
.
USER_NAME_LIMIT_USE_MSG
);
...
@@ -583,9 +584,9 @@ public class UserService {
...
@@ -583,9 +584,9 @@ public class UserService {
Long
ubId
=
userBusinessService
.
checkIsValueExist
(
"UserRole"
,
ue
.
getId
().
toString
());
Long
ubId
=
userBusinessService
.
checkIsValueExist
(
"UserRole"
,
ue
.
getId
().
toString
());
if
(
ubId
!=
null
)
{
if
(
ubId
!=
null
)
{
ubObj
.
put
(
"id"
,
ubId
);
ubObj
.
put
(
"id"
,
ubId
);
userBusinessService
.
updateUserBusiness
(
ubObj
,
null
);
userBusinessService
.
updateUserBusiness
(
ubObj
,
request
);
}
else
{
}
else
{
userBusinessService
.
insertUserBusiness
(
ubObj
,
null
);
userBusinessService
.
insertUserBusiness
(
ubObj
,
request
);
}
}
}
}
if
(
ue
.
getOrgaId
()
==
null
)
{
if
(
ue
.
getOrgaId
()
==
null
)
{
...
...
jshERP-boot/src/main/java/com/jsh/erp/service/userBusiness/UserBusinessService.java
View file @
c4695206
...
@@ -11,6 +11,7 @@ import com.jsh.erp.service.functions.FunctionService;
...
@@ -11,6 +11,7 @@ import com.jsh.erp.service.functions.FunctionService;
import
com.jsh.erp.service.log.LogService
;
import
com.jsh.erp.service.log.LogService
;
import
com.jsh.erp.service.user.UserService
;
import
com.jsh.erp.service.user.UserService
;
import
com.jsh.erp.utils.StringUtil
;
import
com.jsh.erp.utils.StringUtil
;
import
com.jsh.erp.utils.Tools
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -68,6 +69,14 @@ public class UserBusinessService {
...
@@ -68,6 +69,14 @@ public class UserBusinessService {
UserBusiness
userBusiness
=
JSONObject
.
parseObject
(
obj
.
toJSONString
(),
UserBusiness
.
class
);
UserBusiness
userBusiness
=
JSONObject
.
parseObject
(
obj
.
toJSONString
(),
UserBusiness
.
class
);
int
result
=
0
;
int
result
=
0
;
try
{
try
{
String
token
=
""
;
if
(
request
!=
null
)
{
token
=
request
.
getHeader
(
"X-Access-Token"
);
Long
tenantId
=
Tools
.
getTenantIdByToken
(
token
);
if
(
tenantId
!=
0L
)
{
userBusiness
.
setTenantId
(
tenantId
);
}
}
String
value
=
userBusiness
.
getValue
();
String
value
=
userBusiness
.
getValue
();
String
newValue
=
value
.
replaceAll
(
","
,
"\\]\\["
);
String
newValue
=
value
.
replaceAll
(
","
,
"\\]\\["
);
userBusiness
.
setValue
(
newValue
);
userBusiness
.
setValue
(
newValue
);
...
@@ -138,6 +147,19 @@ public class UserBusinessService {
...
@@ -138,6 +147,19 @@ public class UserBusinessService {
return
list
;
return
list
;
}
}
public
List
<
UserBusiness
>
getListBy
(
String
keyId
,
String
type
)
throws
Exception
{
List
<
UserBusiness
>
list
=
null
;
try
{
UserBusinessExample
example
=
new
UserBusinessExample
();
example
.
createCriteria
().
andKeyIdEqualTo
(
keyId
).
andTypeEqualTo
(
type
)
.
andDeleteFlagNotEqualTo
(
BusinessConstants
.
DELETE_FLAG_DELETED
);
list
=
userBusinessMapper
.
selectByExample
(
example
);
}
catch
(
Exception
e
){
JshException
.
readFail
(
logger
,
e
);
}
return
list
;
}
public
String
getUBValueByTypeAndKeyId
(
String
type
,
String
keyId
)
throws
Exception
{
public
String
getUBValueByTypeAndKeyId
(
String
type
,
String
keyId
)
throws
Exception
{
String
ubValue
=
""
;
String
ubValue
=
""
;
List
<
UserBusiness
>
ubList
=
getBasicData
(
keyId
,
type
);
List
<
UserBusiness
>
ubList
=
getBasicData
(
keyId
,
type
);
...
...
jshERP-boot/src/main/resources/mapper_xml/UserBusinessMapper.xml
View file @
c4695206
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
<result
column=
"key_id"
jdbcType=
"VARCHAR"
property=
"keyId"
/>
<result
column=
"key_id"
jdbcType=
"VARCHAR"
property=
"keyId"
/>
<result
column=
"value"
jdbcType=
"VARCHAR"
property=
"value"
/>
<result
column=
"value"
jdbcType=
"VARCHAR"
property=
"value"
/>
<result
column=
"btn_str"
jdbcType=
"VARCHAR"
property=
"btnStr"
/>
<result
column=
"btn_str"
jdbcType=
"VARCHAR"
property=
"btnStr"
/>
<result
column=
"tenant_id"
jdbcType=
"BIGINT"
property=
"tenantId"
/>
<result
column=
"delete_flag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
<result
column=
"delete_flag"
jdbcType=
"VARCHAR"
property=
"deleteFlag"
/>
</resultMap>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<sql
id=
"Example_Where_Clause"
>
...
@@ -68,7 +69,7 @@
...
@@ -68,7 +69,7 @@
</where>
</where>
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, type, key_id, value, btn_str, delete_flag
id, type, key_id, value, btn_str,
tenant_id,
delete_flag
</sql>
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.UserBusinessExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.UserBusinessExample"
resultMap=
"BaseResultMap"
>
select
select
...
@@ -102,11 +103,11 @@
...
@@ -102,11 +103,11 @@
</delete>
</delete>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.UserBusiness"
>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.UserBusiness"
>
insert into jsh_user_business (id, type, key_id,
insert into jsh_user_business (id, type, key_id,
value, btn_str,
delete_flag
value, btn_str,
tenant_id,
)
delete_flag
)
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{keyId,jdbcType=VARCHAR},
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=VARCHAR}, #{keyId,jdbcType=VARCHAR},
#{value,jdbcType=VARCHAR}, #{btnStr,jdbcType=VARCHAR}, #{
deleteFlag
,jdbcType=
VARCHAR}
#{value,jdbcType=VARCHAR}, #{btnStr,jdbcType=VARCHAR}, #{
tenantId
,jdbcType=
BIGINT},
)
#{deleteFlag,jdbcType=VARCHAR}
)
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.UserBusiness"
>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.UserBusiness"
>
insert into jsh_user_business
insert into jsh_user_business
...
@@ -126,6 +127,9 @@
...
@@ -126,6 +127,9 @@
<if
test=
"btnStr != null"
>
<if
test=
"btnStr != null"
>
btn_str,
btn_str,
</if>
</if>
<if
test=
"tenantId != null"
>
tenant_id,
</if>
<if
test=
"deleteFlag != null"
>
<if
test=
"deleteFlag != null"
>
delete_flag,
delete_flag,
</if>
</if>
...
@@ -146,6 +150,9 @@
...
@@ -146,6 +150,9 @@
<if
test=
"btnStr != null"
>
<if
test=
"btnStr != null"
>
#{btnStr,jdbcType=VARCHAR},
#{btnStr,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"tenantId != null"
>
#{tenantId,jdbcType=BIGINT},
</if>
<if
test=
"deleteFlag != null"
>
<if
test=
"deleteFlag != null"
>
#{deleteFlag,jdbcType=VARCHAR},
#{deleteFlag,jdbcType=VARCHAR},
</if>
</if>
...
@@ -175,6 +182,9 @@
...
@@ -175,6 +182,9 @@
<if
test=
"record.btnStr != null"
>
<if
test=
"record.btnStr != null"
>
btn_str = #{record.btnStr,jdbcType=VARCHAR},
btn_str = #{record.btnStr,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"record.tenantId != null"
>
tenant_id = #{record.tenantId,jdbcType=BIGINT},
</if>
<if
test=
"record.deleteFlag != null"
>
<if
test=
"record.deleteFlag != null"
>
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
</if>
...
@@ -190,6 +200,7 @@
...
@@ -190,6 +200,7 @@
key_id = #{record.keyId,jdbcType=VARCHAR},
key_id = #{record.keyId,jdbcType=VARCHAR},
value = #{record.value,jdbcType=VARCHAR},
value = #{record.value,jdbcType=VARCHAR},
btn_str = #{record.btnStr,jdbcType=VARCHAR},
btn_str = #{record.btnStr,jdbcType=VARCHAR},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
delete_flag = #{record.deleteFlag,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
@@ -210,6 +221,9 @@
...
@@ -210,6 +221,9 @@
<if
test=
"btnStr != null"
>
<if
test=
"btnStr != null"
>
btn_str = #{btnStr,jdbcType=VARCHAR},
btn_str = #{btnStr,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"tenantId != null"
>
tenant_id = #{tenantId,jdbcType=BIGINT},
</if>
<if
test=
"deleteFlag != null"
>
<if
test=
"deleteFlag != null"
>
delete_flag = #{deleteFlag,jdbcType=VARCHAR},
delete_flag = #{deleteFlag,jdbcType=VARCHAR},
</if>
</if>
...
@@ -222,6 +236,7 @@
...
@@ -222,6 +236,7 @@
key_id = #{keyId,jdbcType=VARCHAR},
key_id = #{keyId,jdbcType=VARCHAR},
value = #{value,jdbcType=VARCHAR},
value = #{value,jdbcType=VARCHAR},
btn_str = #{btnStr,jdbcType=VARCHAR},
btn_str = #{btnStr,jdbcType=VARCHAR},
tenant_id = #{tenantId,jdbcType=BIGINT},
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
delete_flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment