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
e95a687e
Commit
e95a687e
authored
Aug 24, 2021
by
季圣华
Browse files
给租户增加字段
parent
81bd163d
Changes
12
Show whitespace changes
Inline
Side-by-side
jshERP-boot/docs/jsh_erp.sql
View file @
e95a687e
...
@@ -833,16 +833,17 @@ CREATE TABLE `jsh_tenant` (
...
@@ -833,16 +833,17 @@ CREATE TABLE `jsh_tenant` (
`tenant_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'用户id'
,
`tenant_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'用户id'
,
`login_name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'登录名'
,
`login_name`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'登录名'
,
`user_num_limit`
int
(
11
)
DEFAULT
NULL
COMMENT
'用户数量限制'
,
`user_num_limit`
int
(
11
)
DEFAULT
NULL
COMMENT
'用户数量限制'
,
`
bills_num_limit`
int
(
1
1
)
DEFAULT
NULL
COMMENT
'
单据数量限制
'
,
`
type`
varchar
(
1
)
DEFAULT
'0'
COMMENT
'
租户类型,0免费用户,1付费用户
'
,
`enabled`
bit
(
1
)
DEFAULT
b
'1'
COMMENT
'启用 0-禁用 1-启用'
,
`enabled`
bit
(
1
)
DEFAULT
b
'1'
COMMENT
'启用 0-禁用 1-启用'
,
`create_time`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`create_time`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`expire_time`
datetime
DEFAULT
NULL
COMMENT
'到期时间'
,
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
2
1
DEFAULT
CHARSET
=
utf8
COMMENT
=
'租户'
;
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
1
4
DEFAULT
CHARSET
=
utf8
COMMENT
=
'租户'
;
-- ----------------------------
-- ----------------------------
-- Records of jsh_tenant
-- Records of jsh_tenant
-- ----------------------------
-- ----------------------------
INSERT
INTO
`jsh_tenant`
VALUES
(
'13'
,
'63'
,
'jsh'
,
'20'
,
'
200
0'
,
''
,
'2021-02-17 23:19:17'
);
INSERT
INTO
`jsh_tenant`
VALUES
(
'13'
,
'63'
,
'jsh'
,
'20'
,
'0'
,
''
,
'2021-02-17
23:19:17'
,
'2099-02-17
23:19:17'
);
-- ----------------------------
-- ----------------------------
-- Table structure for jsh_unit
-- Table structure for jsh_unit
...
...
jshERP-boot/docs/数据库更新记录-首次安装请勿使用.txt
View file @
e95a687e
...
@@ -1181,7 +1181,7 @@ alter table jsh_depot_item drop column other_field5;
...
@@ -1181,7 +1181,7 @@ alter table jsh_depot_item drop column other_field5;
-- --------------------------------------------------------
-- --------------------------------------------------------
-- 时间 2021年7月27日
-- 时间 2021年7月27日
-- by jishenghua
-- by jishenghua
--
移除机构表的全名
字段
--
给单据子表加sku
字段
-- --------------------------------------------------------
-- --------------------------------------------------------
alter table jsh_depot_item add sku varchar(50) DEFAULT NULL COMMENT '多属性' after material_unit;
alter table jsh_depot_item add sku varchar(50) DEFAULT NULL COMMENT '多属性' after material_unit;
...
@@ -1191,3 +1191,13 @@ alter table jsh_depot_item add sku varchar(50) DEFAULT NULL COMMENT '多属性'
...
@@ -1191,3 +1191,13 @@ alter table jsh_depot_item add sku varchar(50) DEFAULT NULL COMMENT '多属性'
-- 增加调拨明细菜单
-- 增加调拨明细菜单
-- --------------------------------------------------------
-- --------------------------------------------------------
INSERT INTO `jsh_function` VALUES ('248', '030150', '调拨明细', '0301', '/report/allocation_detail', '/report/AllocationDetail', '\0', '0646', '', '电脑版', '', 'profile', '0');
INSERT INTO `jsh_function` VALUES ('248', '030150', '调拨明细', '0301', '/report/allocation_detail', '/report/AllocationDetail', '\0', '0646', '', '电脑版', '', 'profile', '0');
-- --------------------------------------------------------
-- 时间 2021年8月24日
-- by jishenghua
-- 给租户表加sku字段
-- 给租户表移除单据数量限制字段
-- --------------------------------------------------------
alter table jsh_tenant add type varchar(1) DEFAULT '0' COMMENT '租户类型,0免费用户,1付费用户' after bills_num_limit;
alter table jsh_tenant drop column bills_num_limit;
alter table jsh_tenant add expire_time datetime DEFAULT NULL COMMENT '到期时间' after create_time;
\ No newline at end of file
jshERP-boot/src/main/java/com/jsh/erp/controller/DepotHeadController.java
View file @
e95a687e
...
@@ -313,14 +313,7 @@ public class DepotHeadController {
...
@@ -313,14 +313,7 @@ public class DepotHeadController {
JSONObject
result
=
ExceptionConstants
.
standardSuccess
();
JSONObject
result
=
ExceptionConstants
.
standardSuccess
();
String
beanJson
=
body
.
getInfo
();
String
beanJson
=
body
.
getInfo
();
String
rows
=
body
.
getRows
();
String
rows
=
body
.
getRows
();
Long
billsNumLimit
=
Long
.
parseLong
(
redisService
.
getObjectFromSessionByKey
(
request
,
"billsNumLimit"
).
toString
());
depotHeadService
.
addDepotHeadAndDetail
(
beanJson
,
rows
,
request
);
Long
count
=
depotHeadService
.
countDepotHead
(
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
,
null
);
if
(
count
>=
billsNumLimit
)
{
throw
new
BusinessParamCheckingException
(
ExceptionConstants
.
DEPOT_HEAD_OVER_LIMIT_FAILED_CODE
,
ExceptionConstants
.
DEPOT_HEAD_OVER_LIMIT_FAILED_MSG
);
}
else
{
depotHeadService
.
addDepotHeadAndDetail
(
beanJson
,
rows
,
request
);
}
return
result
;
return
result
;
}
}
...
...
jshERP-boot/src/main/java/com/jsh/erp/controller/UserController.java
View file @
e95a687e
...
@@ -123,10 +123,8 @@ public class UserController {
...
@@ -123,10 +123,8 @@ public class UserController {
if
(
tenant
!=
null
)
{
if
(
tenant
!=
null
)
{
Long
tenantId
=
tenant
.
getTenantId
();
Long
tenantId
=
tenant
.
getTenantId
();
Integer
userNumLimit
=
tenant
.
getUserNumLimit
();
Integer
userNumLimit
=
tenant
.
getUserNumLimit
();
Integer
billsNumLimit
=
tenant
.
getBillsNumLimit
();
if
(
tenantId
!=
null
)
{
if
(
tenantId
!=
null
)
{
redisService
.
storageObjectBySession
(
token
,
"userNumLimit"
,
userNumLimit
);
//用户限制数
redisService
.
storageObjectBySession
(
token
,
"userNumLimit"
,
userNumLimit
);
//用户限制数
redisService
.
storageObjectBySession
(
token
,
"billsNumLimit"
,
billsNumLimit
);
//单据限制数
}
}
}
}
}
}
...
...
jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/Tenant.java
View file @
e95a687e
...
@@ -11,12 +11,14 @@ public class Tenant {
...
@@ -11,12 +11,14 @@ public class Tenant {
private
Integer
userNumLimit
;
private
Integer
userNumLimit
;
private
Integer
billsNumLimit
;
private
String
type
;
private
Boolean
enabled
;
private
Boolean
enabled
;
private
Date
createTime
;
private
Date
createTime
;
private
Date
expireTime
;
public
Long
getId
()
{
public
Long
getId
()
{
return
id
;
return
id
;
}
}
...
@@ -49,12 +51,12 @@ public class Tenant {
...
@@ -49,12 +51,12 @@ public class Tenant {
this
.
userNumLimit
=
userNumLimit
;
this
.
userNumLimit
=
userNumLimit
;
}
}
public
Integer
getBillsNumLimit
()
{
public
String
getType
()
{
return
billsNumLimit
;
return
type
;
}
}
public
void
set
BillsNumLimit
(
Integer
billsNumLimit
)
{
public
void
set
Type
(
String
type
)
{
this
.
billsNumLimit
=
billsNumLimit
;
this
.
type
=
type
==
null
?
null
:
type
.
trim
()
;
}
}
public
Boolean
getEnabled
()
{
public
Boolean
getEnabled
()
{
...
@@ -72,4 +74,12 @@ public class Tenant {
...
@@ -72,4 +74,12 @@ public class Tenant {
public
void
setCreateTime
(
Date
createTime
)
{
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
this
.
createTime
=
createTime
;
}
}
public
Date
getExpireTime
()
{
return
expireTime
;
}
public
void
setExpireTime
(
Date
expireTime
)
{
this
.
expireTime
=
expireTime
;
}
}
}
\ No newline at end of file
jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/TenantEx.java
View file @
e95a687e
...
@@ -4,6 +4,8 @@ public class TenantEx extends Tenant{
...
@@ -4,6 +4,8 @@ public class TenantEx extends Tenant{
private
String
createTimeStr
;
private
String
createTimeStr
;
private
String
expireTimeStr
;
public
String
getCreateTimeStr
()
{
public
String
getCreateTimeStr
()
{
return
createTimeStr
;
return
createTimeStr
;
}
}
...
@@ -11,4 +13,12 @@ public class TenantEx extends Tenant{
...
@@ -11,4 +13,12 @@ public class TenantEx extends Tenant{
public
void
setCreateTimeStr
(
String
createTimeStr
)
{
public
void
setCreateTimeStr
(
String
createTimeStr
)
{
this
.
createTimeStr
=
createTimeStr
;
this
.
createTimeStr
=
createTimeStr
;
}
}
public
String
getExpireTimeStr
()
{
return
expireTimeStr
;
}
public
void
setExpireTimeStr
(
String
expireTimeStr
)
{
this
.
expireTimeStr
=
expireTimeStr
;
}
}
}
\ No newline at end of file
jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/TenantExample.java
View file @
e95a687e
...
@@ -355,63 +355,73 @@ public class TenantExample {
...
@@ -355,63 +355,73 @@ public class TenantExample {
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
BillsNumLimit
IsNull
()
{
public
Criteria
and
Type
IsNull
()
{
addCriterion
(
"
bills_num_limit
is null"
);
addCriterion
(
"
type
is null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
BillsNumLimit
IsNotNull
()
{
public
Criteria
and
Type
IsNotNull
()
{
addCriterion
(
"
bills_num_limit
is not null"
);
addCriterion
(
"
type
is not null"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
BillsNumLimit
EqualTo
(
Integer
value
)
{
public
Criteria
and
Type
EqualTo
(
String
value
)
{
addCriterion
(
"
bills_num_limit ="
,
value
,
"billsNumLimit
"
);
addCriterion
(
"
type ="
,
value
,
"type
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
BillsNumLimit
NotEqualTo
(
Integer
value
)
{
public
Criteria
and
Type
NotEqualTo
(
String
value
)
{
addCriterion
(
"
bills_num_limit
<>"
,
value
,
"
billsNumLimit
"
);
addCriterion
(
"
type
<>"
,
value
,
"
type
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
BillsNumLimit
GreaterThan
(
Integer
value
)
{
public
Criteria
and
Type
GreaterThan
(
String
value
)
{
addCriterion
(
"
bills_num_limit >"
,
value
,
"billsNumLimit
"
);
addCriterion
(
"
type >"
,
value
,
"type
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
BillsNumLimit
GreaterThanOrEqualTo
(
Integer
value
)
{
public
Criteria
and
Type
GreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
bills_num_limit
>="
,
value
,
"
billsNumLimit
"
);
addCriterion
(
"
type
>="
,
value
,
"
type
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
BillsNumLimit
LessThan
(
Integer
value
)
{
public
Criteria
and
Type
LessThan
(
String
value
)
{
addCriterion
(
"
bills_num_limit <"
,
value
,
"billsNumLimit
"
);
addCriterion
(
"
type <"
,
value
,
"type
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
BillsNumLimit
LessThanOrEqualTo
(
Integer
value
)
{
public
Criteria
and
Type
LessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"
bills_num_limit
<="
,
value
,
"
billsNumLimit
"
);
addCriterion
(
"
type
<="
,
value
,
"
type
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
BillsNumLimitIn
(
List
<
Integer
>
value
s
)
{
public
Criteria
and
TypeLike
(
String
value
)
{
addCriterion
(
"
bills_num_limit in
"
,
value
s
,
"
billsNumLimit
"
);
addCriterion
(
"
type like
"
,
value
,
"
type
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
BillsNumLimitNotIn
(
List
<
Integer
>
value
s
)
{
public
Criteria
and
TypeNotLike
(
String
value
)
{
addCriterion
(
"
bills_num_limit
not
in
"
,
value
s
,
"
billsNumLimit
"
);
addCriterion
(
"
type
not
like
"
,
value
,
"
type
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
and
BillsNumLimitBetween
(
Integer
value1
,
Integer
value
2
)
{
public
Criteria
and
TypeIn
(
List
<
String
>
value
s
)
{
addCriterion
(
"
bills_num_limit between"
,
value1
,
value2
,
"billsNumLimit
"
);
addCriterion
(
"
type in"
,
values
,
"type
"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andBillsNumLimitNotBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andTypeNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"bills_num_limit not between"
,
value1
,
value2
,
"billsNumLimit"
);
addCriterion
(
"type not in"
,
values
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"type between"
,
value1
,
value2
,
"type"
);
return
(
Criteria
)
this
;
}
public
Criteria
andTypeNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"type not between"
,
value1
,
value2
,
"type"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
...
@@ -534,6 +544,66 @@ public class TenantExample {
...
@@ -534,6 +544,66 @@ public class TenantExample {
addCriterion
(
"create_time not between"
,
value1
,
value2
,
"createTime"
);
addCriterion
(
"create_time not between"
,
value1
,
value2
,
"createTime"
);
return
(
Criteria
)
this
;
return
(
Criteria
)
this
;
}
}
public
Criteria
andExpireTimeIsNull
()
{
addCriterion
(
"expire_time is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andExpireTimeIsNotNull
()
{
addCriterion
(
"expire_time is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andExpireTimeEqualTo
(
Date
value
)
{
addCriterion
(
"expire_time ="
,
value
,
"expireTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andExpireTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"expire_time <>"
,
value
,
"expireTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andExpireTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"expire_time >"
,
value
,
"expireTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andExpireTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"expire_time >="
,
value
,
"expireTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andExpireTimeLessThan
(
Date
value
)
{
addCriterion
(
"expire_time <"
,
value
,
"expireTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andExpireTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"expire_time <="
,
value
,
"expireTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andExpireTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"expire_time in"
,
values
,
"expireTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andExpireTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"expire_time not in"
,
values
,
"expireTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andExpireTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"expire_time between"
,
value1
,
value2
,
"expireTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andExpireTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"expire_time not between"
,
value1
,
value2
,
"expireTime"
);
return
(
Criteria
)
this
;
}
}
}
public
static
class
Criteria
extends
GeneratedCriteria
{
public
static
class
Criteria
extends
GeneratedCriteria
{
...
...
jshERP-boot/src/main/java/com/jsh/erp/datasource/entities/UserEx.java
View file @
e95a687e
...
@@ -24,8 +24,6 @@ public class UserEx extends User{
...
@@ -24,8 +24,6 @@ public class UserEx extends User{
private
String
userNumLimit
;
private
String
userNumLimit
;
private
String
billsNumLimit
;
public
String
getOrgAbr
()
{
public
String
getOrgAbr
()
{
return
orgAbr
;
return
orgAbr
;
}
}
...
@@ -89,12 +87,4 @@ public class UserEx extends User{
...
@@ -89,12 +87,4 @@ public class UserEx extends User{
public
void
setUserNumLimit
(
String
userNumLimit
)
{
public
void
setUserNumLimit
(
String
userNumLimit
)
{
this
.
userNumLimit
=
userNumLimit
;
this
.
userNumLimit
=
userNumLimit
;
}
}
public
String
getBillsNumLimit
()
{
return
billsNumLimit
;
}
public
void
setBillsNumLimit
(
String
billsNumLimit
)
{
this
.
billsNumLimit
=
billsNumLimit
;
}
}
}
jshERP-boot/src/main/java/com/jsh/erp/service/tenant/TenantService.java
View file @
e95a687e
...
@@ -39,10 +39,6 @@ public class TenantService {
...
@@ -39,10 +39,6 @@ public class TenantService {
@Value
(
"${tenant.userNumLimit}"
)
@Value
(
"${tenant.userNumLimit}"
)
private
Integer
userNumLimit
;
private
Integer
userNumLimit
;
@Value
(
"${tenant.billsNumLimit}"
)
private
Integer
billsNumLimit
;
public
Tenant
getTenant
(
long
id
)
throws
Exception
{
public
Tenant
getTenant
(
long
id
)
throws
Exception
{
Tenant
result
=
null
;
Tenant
result
=
null
;
try
{
try
{
...
@@ -71,6 +67,7 @@ public class TenantService {
...
@@ -71,6 +67,7 @@ public class TenantService {
if
(
null
!=
list
)
{
if
(
null
!=
list
)
{
for
(
TenantEx
tenantEx
:
list
)
{
for
(
TenantEx
tenantEx
:
list
)
{
tenantEx
.
setCreateTimeStr
(
Tools
.
getCenternTime
(
tenantEx
.
getCreateTime
()));
tenantEx
.
setCreateTimeStr
(
Tools
.
getCenternTime
(
tenantEx
.
getCreateTime
()));
tenantEx
.
setExpireTimeStr
(
Tools
.
getCenternTime
(
tenantEx
.
getExpireTime
()));
}
}
}
}
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
...
@@ -97,9 +94,6 @@ public class TenantService {
...
@@ -97,9 +94,6 @@ public class TenantService {
if
(
tenant
.
getUserNumLimit
()==
null
)
{
if
(
tenant
.
getUserNumLimit
()==
null
)
{
tenant
.
setUserNumLimit
(
userNumLimit
);
//默认用户限制数量
tenant
.
setUserNumLimit
(
userNumLimit
);
//默认用户限制数量
}
}
if
(
tenant
.
getBillsNumLimit
()==
null
)
{
tenant
.
setBillsNumLimit
(
billsNumLimit
);
//默认单据限制数量
}
tenant
.
setCreateTime
(
new
Date
());
tenant
.
setCreateTime
(
new
Date
());
result
=
tenantMapper
.
insertSelective
(
tenant
);
result
=
tenantMapper
.
insertSelective
(
tenant
);
}
catch
(
Exception
e
){
}
catch
(
Exception
e
){
...
...
jshERP-boot/src/main/java/com/jsh/erp/service/user/UserService.java
View file @
e95a687e
...
@@ -517,7 +517,6 @@ public class UserService {
...
@@ -517,7 +517,6 @@ public class UserService {
tenantObj
.
put
(
"tenantId"
,
ue
.
getId
());
tenantObj
.
put
(
"tenantId"
,
ue
.
getId
());
tenantObj
.
put
(
"loginName"
,
ue
.
getLoginName
());
tenantObj
.
put
(
"loginName"
,
ue
.
getLoginName
());
tenantObj
.
put
(
"userNumLimit"
,
ue
.
getUserNumLimit
());
tenantObj
.
put
(
"userNumLimit"
,
ue
.
getUserNumLimit
());
tenantObj
.
put
(
"billsNumLimit"
,
ue
.
getBillsNumLimit
());
tenantService
.
insertTenant
(
tenantObj
,
request
);
tenantService
.
insertTenant
(
tenantObj
,
request
);
logger
.
info
(
"===============创建租户信息完成==============="
);
logger
.
info
(
"===============创建租户信息完成==============="
);
if
(
result
>
0
)
{
if
(
result
>
0
)
{
...
...
jshERP-boot/src/main/resources/application.properties
View file @
e95a687e
...
@@ -18,8 +18,6 @@ spring.redis.password=1234abcd
...
@@ -18,8 +18,6 @@ spring.redis.password=1234abcd
manage.roleId
=
10
manage.roleId
=
10
#租户允许创建的用户数
#租户允许创建的用户数
tenant.userNumLimit
=
1000000
tenant.userNumLimit
=
1000000
#租户允许创建的单据数
tenant.billsNumLimit
=
100000000
#演示模式开关-默认关闭:false
#演示模式开关-默认关闭:false
demonstrate.open
=
false
demonstrate.open
=
false
#插件配置
#插件配置
...
...
jshERP-boot/src/main/resources/mapper_xml/TenantMapper.xml
View file @
e95a687e
...
@@ -6,9 +6,10 @@
...
@@ -6,9 +6,10 @@
<result
column=
"tenant_id"
jdbcType=
"BIGINT"
property=
"tenantId"
/>
<result
column=
"tenant_id"
jdbcType=
"BIGINT"
property=
"tenantId"
/>
<result
column=
"login_name"
jdbcType=
"VARCHAR"
property=
"loginName"
/>
<result
column=
"login_name"
jdbcType=
"VARCHAR"
property=
"loginName"
/>
<result
column=
"user_num_limit"
jdbcType=
"INTEGER"
property=
"userNumLimit"
/>
<result
column=
"user_num_limit"
jdbcType=
"INTEGER"
property=
"userNumLimit"
/>
<result
column=
"
bills_num_limit
"
jdbcType=
"
INTEGE
R"
property=
"
billsNumLimit
"
/>
<result
column=
"
type
"
jdbcType=
"
VARCHA
R"
property=
"
type
"
/>
<result
column=
"enabled"
jdbcType=
"BIT"
property=
"enabled"
/>
<result
column=
"enabled"
jdbcType=
"BIT"
property=
"enabled"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"expire_time"
jdbcType=
"TIMESTAMP"
property=
"expireTime"
/>
</resultMap>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<sql
id=
"Example_Where_Clause"
>
<where>
<where>
...
@@ -69,7 +70,7 @@
...
@@ -69,7 +70,7 @@
</where>
</where>
</sql>
</sql>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, tenant_id, login_name, user_num_limit,
bills_num_limit
, enabled, create_time
id, tenant_id, login_name, user_num_limit,
type
, enabled, create_time
, expire_time
</sql>
</sql>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.TenantExample"
resultMap=
"BaseResultMap"
>
<select
id=
"selectByExample"
parameterType=
"com.jsh.erp.datasource.entities.TenantExample"
resultMap=
"BaseResultMap"
>
select
select
...
@@ -103,11 +104,11 @@
...
@@ -103,11 +104,11 @@
</delete>
</delete>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.Tenant"
>
<insert
id=
"insert"
parameterType=
"com.jsh.erp.datasource.entities.Tenant"
>
insert into jsh_tenant (id, tenant_id, login_name,
insert into jsh_tenant (id, tenant_id, login_name,
user_num_limit,
bills_num_limit
, enabled,
user_num_limit,
type
, enabled,
create_time)
create_time
, expire_time
)
values (#{id,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT}, #{loginName,jdbcType=VARCHAR},
values (#{id,jdbcType=BIGINT}, #{tenantId,jdbcType=BIGINT}, #{loginName,jdbcType=VARCHAR},
#{userNumLimit,jdbcType=INTEGER}, #{
billsNumLimit
,jdbcType=
INTEGE
R}, #{enabled,jdbcType=BIT},
#{userNumLimit,jdbcType=INTEGER}, #{
type
,jdbcType=
VARCHA
R}, #{enabled,jdbcType=BIT},
#{createTime,jdbcType=TIMESTAMP})
#{createTime,jdbcType=TIMESTAMP}
, #{expireTime,jdbcType=TIMESTAMP}
)
</insert>
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.Tenant"
>
<insert
id=
"insertSelective"
parameterType=
"com.jsh.erp.datasource.entities.Tenant"
>
insert into jsh_tenant
insert into jsh_tenant
...
@@ -124,8 +125,8 @@
...
@@ -124,8 +125,8 @@
<if
test=
"userNumLimit != null"
>
<if
test=
"userNumLimit != null"
>
user_num_limit,
user_num_limit,
</if>
</if>
<if
test=
"
billsNumLimit
!= null"
>
<if
test=
"
type
!= null"
>
bills_num_limit
,
type
,
</if>
</if>
<if
test=
"enabled != null"
>
<if
test=
"enabled != null"
>
enabled,
enabled,
...
@@ -133,6 +134,9 @@
...
@@ -133,6 +134,9 @@
<if
test=
"createTime != null"
>
<if
test=
"createTime != null"
>
create_time,
create_time,
</if>
</if>
<if
test=
"expireTime != null"
>
expire_time,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
<if
test=
"id != null"
>
...
@@ -147,8 +151,8 @@
...
@@ -147,8 +151,8 @@
<if
test=
"userNumLimit != null"
>
<if
test=
"userNumLimit != null"
>
#{userNumLimit,jdbcType=INTEGER},
#{userNumLimit,jdbcType=INTEGER},
</if>
</if>
<if
test=
"
billsNumLimit
!= null"
>
<if
test=
"
type
!= null"
>
#{
billsNumLimit
,jdbcType=
INTEGE
R},
#{
type
,jdbcType=
VARCHA
R},
</if>
</if>
<if
test=
"enabled != null"
>
<if
test=
"enabled != null"
>
#{enabled,jdbcType=BIT},
#{enabled,jdbcType=BIT},
...
@@ -156,6 +160,9 @@
...
@@ -156,6 +160,9 @@
<if
test=
"createTime != null"
>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
#{createTime,jdbcType=TIMESTAMP},
</if>
</if>
<if
test=
"expireTime != null"
>
#{expireTime,jdbcType=TIMESTAMP},
</if>
</trim>
</trim>
</insert>
</insert>
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.TenantExample"
resultType=
"java.lang.Long"
>
<select
id=
"countByExample"
parameterType=
"com.jsh.erp.datasource.entities.TenantExample"
resultType=
"java.lang.Long"
>
...
@@ -179,8 +186,8 @@
...
@@ -179,8 +186,8 @@
<if
test=
"record.userNumLimit != null"
>
<if
test=
"record.userNumLimit != null"
>
user_num_limit = #{record.userNumLimit,jdbcType=INTEGER},
user_num_limit = #{record.userNumLimit,jdbcType=INTEGER},
</if>
</if>
<if
test=
"record.
billsNumLimit
!= null"
>
<if
test=
"record.
type
!= null"
>
bills_num_limit = #{record.billsNumLimit
,jdbcType=
INTEGE
R},
type = #{record.type
,jdbcType=
VARCHA
R},
</if>
</if>
<if
test=
"record.enabled != null"
>
<if
test=
"record.enabled != null"
>
enabled = #{record.enabled,jdbcType=BIT},
enabled = #{record.enabled,jdbcType=BIT},
...
@@ -188,6 +195,9 @@
...
@@ -188,6 +195,9 @@
<if
test=
"record.createTime != null"
>
<if
test=
"record.createTime != null"
>
create_time = #{record.createTime,jdbcType=TIMESTAMP},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
</if>
<if
test=
"record.expireTime != null"
>
expire_time = #{record.expireTime,jdbcType=TIMESTAMP},
</if>
</set>
</set>
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
@@ -199,9 +209,10 @@
...
@@ -199,9 +209,10 @@
tenant_id = #{record.tenantId,jdbcType=BIGINT},
tenant_id = #{record.tenantId,jdbcType=BIGINT},
login_name = #{record.loginName,jdbcType=VARCHAR},
login_name = #{record.loginName,jdbcType=VARCHAR},
user_num_limit = #{record.userNumLimit,jdbcType=INTEGER},
user_num_limit = #{record.userNumLimit,jdbcType=INTEGER},
bills_num_limit = #{record.billsNumLimit
,jdbcType=
INTEGE
R},
type = #{record.type
,jdbcType=
VARCHA
R},
enabled = #{record.enabled,jdbcType=BIT},
enabled = #{record.enabled,jdbcType=BIT},
create_time = #{record.createTime,jdbcType=TIMESTAMP}
create_time = #{record.createTime,jdbcType=TIMESTAMP},
expire_time = #{record.expireTime,jdbcType=TIMESTAMP}
<if
test=
"_parameter != null"
>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
</if>
...
@@ -218,8 +229,8 @@
...
@@ -218,8 +229,8 @@
<if
test=
"userNumLimit != null"
>
<if
test=
"userNumLimit != null"
>
user_num_limit = #{userNumLimit,jdbcType=INTEGER},
user_num_limit = #{userNumLimit,jdbcType=INTEGER},
</if>
</if>
<if
test=
"
billsNumLimit
!= null"
>
<if
test=
"
type
!= null"
>
bills_num_limit = #{billsNumLimit
,jdbcType=
INTEGE
R},
type = #{type
,jdbcType=
VARCHA
R},
</if>
</if>
<if
test=
"enabled != null"
>
<if
test=
"enabled != null"
>
enabled = #{enabled,jdbcType=BIT},
enabled = #{enabled,jdbcType=BIT},
...
@@ -227,6 +238,9 @@
...
@@ -227,6 +238,9 @@
<if
test=
"createTime != null"
>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</if>
<if
test=
"expireTime != null"
>
expire_time = #{expireTime,jdbcType=TIMESTAMP},
</if>
</set>
</set>
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
...
@@ -235,9 +249,10 @@
...
@@ -235,9 +249,10 @@
set tenant_id = #{tenantId,jdbcType=BIGINT},
set tenant_id = #{tenantId,jdbcType=BIGINT},
login_name = #{loginName,jdbcType=VARCHAR},
login_name = #{loginName,jdbcType=VARCHAR},
user_num_limit = #{userNumLimit,jdbcType=INTEGER},
user_num_limit = #{userNumLimit,jdbcType=INTEGER},
bills_num_limit = #{billsNumLimit
,jdbcType=
INTEGE
R},
type = #{type
,jdbcType=
VARCHA
R},
enabled = #{enabled,jdbcType=BIT},
enabled = #{enabled,jdbcType=BIT},
create_time = #{createTime,jdbcType=TIMESTAMP}
create_time = #{createTime,jdbcType=TIMESTAMP},
expire_time = #{expireTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT}
</update>
</update>
</mapper>
</mapper>
\ No newline at end of file
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