提交 5c65f5b9 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码 [ibiz-uaa,UAA鉴权]

上级 fa633562
......@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
@Service("SysAuthLogServiceImpl")
public class SysAuthLogServiceImpl extends ServiceImpl<SysAuthLogMapper, SysAuthLog> implements ISysAuthLogService {
@Autowired
@Lazy
ISysAuthLogService proxyService;
protected int batchSize = 500;
......@@ -133,21 +136,49 @@ public class SysAuthLogServiceImpl extends ServiceImpl<SysAuthLogMapper, SysAuth
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
return checkKey(et) ? proxyService.update(et) : proxyService.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<SysAuthLog> list) {
saveOrUpdateBatch(list,batchSize);
List<SysAuthLog> create = new ArrayList<>();
List<SysAuthLog> update = new ArrayList<>();
for (SysAuthLog et : list) {
if (ObjectUtils.isEmpty(et.getLogid()) || ObjectUtils.isEmpty(getById(et.getLogid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
return true;
}
@Override
@Transactional
public void saveBatch(List<SysAuthLog> list) {
saveOrUpdateBatch(list,batchSize);
List<SysAuthLog> create = new ArrayList<>();
List<SysAuthLog> update = new ArrayList<>();
for (SysAuthLog et : list) {
if (ObjectUtils.isEmpty(et.getLogid()) || ObjectUtils.isEmpty(getById(et.getLogid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
}
......
......@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
@Service("SysOpenAccessServiceImpl")
public class SysOpenAccessServiceImpl extends ServiceImpl<SysOpenAccessMapper, SysOpenAccess> implements ISysOpenAccessService {
@Autowired
@Lazy
ISysOpenAccessService proxyService;
protected int batchSize = 500;
......@@ -133,21 +136,49 @@ public class SysOpenAccessServiceImpl extends ServiceImpl<SysOpenAccessMapper, S
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
return checkKey(et) ? proxyService.update(et) : proxyService.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<SysOpenAccess> list) {
saveOrUpdateBatch(list,batchSize);
List<SysOpenAccess> create = new ArrayList<>();
List<SysOpenAccess> update = new ArrayList<>();
for (SysOpenAccess et : list) {
if (ObjectUtils.isEmpty(et.getId()) || ObjectUtils.isEmpty(getById(et.getId()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
return true;
}
@Override
@Transactional
public void saveBatch(List<SysOpenAccess> list) {
saveOrUpdateBatch(list,batchSize);
List<SysOpenAccess> create = new ArrayList<>();
List<SysOpenAccess> update = new ArrayList<>();
for (SysOpenAccess et : list) {
if (ObjectUtils.isEmpty(et.getId()) || ObjectUtils.isEmpty(getById(et.getId()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
}
......
......@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
@Service("SysPSSystemServiceImpl")
public class SysPSSystemServiceImpl extends ServiceImpl<SysPSSystemMapper, SysPSSystem> implements ISysPSSystemService {
@Autowired
@Lazy
ISysPSSystemService proxyService;
protected int batchSize = 500;
......@@ -149,21 +152,49 @@ public class SysPSSystemServiceImpl extends ServiceImpl<SysPSSystemMapper, SysPS
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
return checkKey(et) ? proxyService.update(et) : proxyService.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<SysPSSystem> list) {
saveOrUpdateBatch(list,batchSize);
List<SysPSSystem> create = new ArrayList<>();
List<SysPSSystem> update = new ArrayList<>();
for (SysPSSystem et : list) {
if (ObjectUtils.isEmpty(et.getPssystemid()) || ObjectUtils.isEmpty(getById(et.getPssystemid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
return true;
}
@Override
@Transactional
public void saveBatch(List<SysPSSystem> list) {
saveOrUpdateBatch(list,batchSize);
List<SysPSSystem> create = new ArrayList<>();
List<SysPSSystem> update = new ArrayList<>();
for (SysPSSystem et : list) {
if (ObjectUtils.isEmpty(et.getPssystemid()) || ObjectUtils.isEmpty(getById(et.getPssystemid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
}
@Override
......
......@@ -51,6 +51,9 @@ public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, S
@Autowired
@Lazy
protected cn.ibizlab.core.uaa.service.ISysRolePermissionService sysrolepermissionService;
@Autowired
@Lazy
ISysPermissionService proxyService;
protected int batchSize = 500;
......@@ -138,21 +141,49 @@ public class SysPermissionServiceImpl extends ServiceImpl<SysPermissionMapper, S
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
return checkKey(et) ? proxyService.update(et) : proxyService.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<SysPermission> list) {
saveOrUpdateBatch(list,batchSize);
List<SysPermission> create = new ArrayList<>();
List<SysPermission> update = new ArrayList<>();
for (SysPermission et : list) {
if (ObjectUtils.isEmpty(et.getPermissionid()) || ObjectUtils.isEmpty(getById(et.getPermissionid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
return true;
}
@Override
@Transactional
public void saveBatch(List<SysPermission> list) {
saveOrUpdateBatch(list,batchSize);
List<SysPermission> create = new ArrayList<>();
List<SysPermission> update = new ArrayList<>();
for (SysPermission et : list) {
if (ObjectUtils.isEmpty(et.getPermissionid()) || ObjectUtils.isEmpty(getById(et.getPermissionid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
}
......
......@@ -54,6 +54,9 @@ public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionM
@Autowired
@Lazy
protected cn.ibizlab.core.uaa.service.ISysRoleService sysroleService;
@Autowired
@Lazy
ISysRolePermissionService proxyService;
protected int batchSize = 500;
......@@ -144,7 +147,7 @@ public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionM
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
return checkKey(et) ? proxyService.update(et) : proxyService.create(et);
}
}
......@@ -152,7 +155,21 @@ public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionM
@Transactional
public boolean saveBatch(Collection<SysRolePermission> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
List<SysRolePermission> create = new ArrayList<>();
List<SysRolePermission> update = new ArrayList<>();
for (SysRolePermission et : list) {
if (ObjectUtils.isEmpty(et.getRolepermissionid()) || ObjectUtils.isEmpty(getById(et.getRolepermissionid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
return true;
}
......@@ -160,7 +177,21 @@ public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionM
@Transactional
public void saveBatch(List<SysRolePermission> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
List<SysRolePermission> create = new ArrayList<>();
List<SysRolePermission> update = new ArrayList<>();
for (SysRolePermission et : list) {
if (ObjectUtils.isEmpty(et.getRolepermissionid()) || ObjectUtils.isEmpty(getById(et.getRolepermissionid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
}
......
......@@ -56,6 +56,9 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
@Autowired
@Lazy
protected cn.ibizlab.core.uaa.service.ISysUserRoleService sysuserroleService;
@Autowired
@Lazy
ISysRoleService proxyService;
protected int batchSize = 500;
......@@ -166,7 +169,7 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
return checkKey(et) ? proxyService.update(et) : proxyService.create(et);
}
}
......@@ -174,7 +177,21 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
@Transactional
public boolean saveBatch(Collection<SysRole> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
List<SysRole> create = new ArrayList<>();
List<SysRole> update = new ArrayList<>();
for (SysRole et : list) {
if (ObjectUtils.isEmpty(et.getRoleid()) || ObjectUtils.isEmpty(getById(et.getRoleid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
return true;
}
......@@ -182,7 +199,21 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
@Transactional
public void saveBatch(List<SysRole> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
List<SysRole> create = new ArrayList<>();
List<SysRole> update = new ArrayList<>();
for (SysRole et : list) {
if (ObjectUtils.isEmpty(et.getRoleid()) || ObjectUtils.isEmpty(getById(et.getRoleid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
}
......
......@@ -51,6 +51,9 @@ public class SysUserAuthServiceImpl extends ServiceImpl<SysUserAuthMapper, SysUs
@Autowired
@Lazy
protected cn.ibizlab.core.uaa.service.ISysUserService sysuserService;
@Autowired
@Lazy
ISysUserAuthService proxyService;
protected int batchSize = 500;
......@@ -141,7 +144,7 @@ public class SysUserAuthServiceImpl extends ServiceImpl<SysUserAuthMapper, SysUs
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
return checkKey(et) ? proxyService.update(et) : proxyService.create(et);
}
}
......@@ -149,7 +152,21 @@ public class SysUserAuthServiceImpl extends ServiceImpl<SysUserAuthMapper, SysUs
@Transactional
public boolean saveBatch(Collection<SysUserAuth> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
List<SysUserAuth> create = new ArrayList<>();
List<SysUserAuth> update = new ArrayList<>();
for (SysUserAuth et : list) {
if (ObjectUtils.isEmpty(et.getId()) || ObjectUtils.isEmpty(getById(et.getId()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
return true;
}
......@@ -157,7 +174,21 @@ public class SysUserAuthServiceImpl extends ServiceImpl<SysUserAuthMapper, SysUs
@Transactional
public void saveBatch(List<SysUserAuth> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
List<SysUserAuth> create = new ArrayList<>();
List<SysUserAuth> update = new ArrayList<>();
for (SysUserAuth et : list) {
if (ObjectUtils.isEmpty(et.getId()) || ObjectUtils.isEmpty(getById(et.getId()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
}
......
......@@ -54,6 +54,9 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
@Autowired
@Lazy
protected cn.ibizlab.core.uaa.service.ISysUserService sysuserService;
@Autowired
@Lazy
ISysUserRoleService proxyService;
protected int batchSize = 500;
......@@ -144,7 +147,7 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
return checkKey(et) ? proxyService.update(et) : proxyService.create(et);
}
}
......@@ -152,7 +155,21 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
@Transactional
public boolean saveBatch(Collection<SysUserRole> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
List<SysUserRole> create = new ArrayList<>();
List<SysUserRole> update = new ArrayList<>();
for (SysUserRole et : list) {
if (ObjectUtils.isEmpty(et.getUserroleid()) || ObjectUtils.isEmpty(getById(et.getUserroleid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
return true;
}
......@@ -160,7 +177,21 @@ public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUs
@Transactional
public void saveBatch(List<SysUserRole> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
List<SysUserRole> create = new ArrayList<>();
List<SysUserRole> update = new ArrayList<>();
for (SysUserRole et : list) {
if (ObjectUtils.isEmpty(et.getUserroleid()) || ObjectUtils.isEmpty(getById(et.getUserroleid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
}
......
......@@ -54,6 +54,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
@Autowired
@Lazy
protected cn.ibizlab.core.uaa.service.ISysUserRoleService sysuserroleService;
@Autowired
@Lazy
ISysUserService proxyService;
protected int batchSize = 500;
......@@ -139,21 +142,49 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
return checkKey(et) ? proxyService.update(et) : proxyService.create(et);
}
}
@Override
@Transactional
public boolean saveBatch(Collection<SysUser> list) {
saveOrUpdateBatch(list,batchSize);
List<SysUser> create = new ArrayList<>();
List<SysUser> update = new ArrayList<>();
for (SysUser et : list) {
if (ObjectUtils.isEmpty(et.getUserid()) || ObjectUtils.isEmpty(getById(et.getUserid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
return true;
}
@Override
@Transactional
public void saveBatch(List<SysUser> list) {
saveOrUpdateBatch(list,batchSize);
List<SysUser> create = new ArrayList<>();
List<SysUser> update = new ArrayList<>();
for (SysUser et : list) {
if (ObjectUtils.isEmpty(et.getUserid()) || ObjectUtils.isEmpty(getById(et.getUserid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
}
......
......@@ -84,7 +84,7 @@
<!--输出实体[SYS_PERMISSION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_permission-5-4">
<changeSet author="a_A_5d9d78509" id="tab-sys_permission-6-4">
<createTable tableName="IBZPERMISSION">
<column name="SYS_PERMISSIONID" remarks="" type="VARCHAR(200)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_PERMISSION_SYS_PERMISSI"/>
......@@ -106,7 +106,7 @@
<!--输出实体[SYS_ROLE]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_role-40-5">
<changeSet author="a_A_5d9d78509" id="tab-sys_role-42-5">
<createTable tableName="IBZROLE">
<column name="SYS_ROLEID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_ROLE_SYS_ROLEID"/>
......@@ -130,7 +130,7 @@
<!--输出实体[SYS_ROLE_PERMISSION]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_role_permission-11-6">
<changeSet author="a_A_5d9d78509" id="tab-sys_role_permission-14-6">
<createTable tableName="IBZROLE_PERMISSION">
<column name="SYS_ROLE_PERMISSIONID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_ROLE_PERMISSION_SYS_ROL"/>
......@@ -189,16 +189,16 @@
<!--输出实体[SYS_PSSYSTEM]外键关系 -->
<!--输出实体[SYS_PERMISSION]外键关系 -->
<!--输出实体[SYS_ROLE]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-sys_role-40-9">
<changeSet author="a_A_5d9d78509" id="fk-sys_role-42-9">
<addForeignKeyConstraint baseColumnNames="PROLEID" baseTableName="IBZROLE" constraintName="DER1N_SYS_ROLE_SYS_ROLE_PROLEI" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SYS_ROLEID" referencedTableName="IBZROLE" validate="true"/>
</changeSet>
<!--输出实体[SYS_ROLE_PERMISSION]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-sys_role_permission-11-10">
<addForeignKeyConstraint baseColumnNames="SYS_PERMISSIONID" baseTableName="IBZROLE_PERMISSION" constraintName="DER1N_SYS_ROLE_PERMISSION_SYS_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SYS_PERMISSIONID" referencedTableName="IBZPERMISSION" validate="true"/>
<changeSet author="a_A_5d9d78509" id="fk-sys_role_permission-14-10">
<addForeignKeyConstraint baseColumnNames="SYS_ROLEID" baseTableName="IBZROLE_PERMISSION" constraintName="DER1N_SYS_ROLE_PERMISSION_SYS_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SYS_ROLEID" referencedTableName="IBZROLE" validate="true"/>
</changeSet>
<!--输出实体[SYS_USER_AUTH]外键关系 -->
<!--输出实体[SYS_USER_ROLE]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-sys_user_role-13-12">
<changeSet author="a_A_5d9d78509" id="fk-sys_user_role-13-11">
<addForeignKeyConstraint baseColumnNames="SYS_ROLEID" baseTableName="IBZUSER_ROLE" constraintName="DER1N_SYS_USER_ROLE_SYS_ROLE_S" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="SYS_ROLEID" referencedTableName="IBZROLE" validate="true"/>
</changeSet>
......
......@@ -31,9 +31,6 @@
<mybatis-plus.version>3.3.1</mybatis-plus.version>
<mybatis-plus-dynamic-datasource.version>3.0.0</mybatis-plus-dynamic-datasource.version>
<!-- Liquibase -->
<liquibase.version>3.6.3</liquibase.version>
<!-- Swagger2 -->
<springfox-swagger.version>2.9.2</springfox-swagger.version>
......@@ -60,7 +57,7 @@
<jsonwebtoken-jjwt.version>0.9.1</jsonwebtoken-jjwt.version>
<!--Liquibase数据库版本更新工具-->
<liquibase.version>3.8.7</liquibase.version>
<liquibase.version>3.9.0</liquibase.version>
<!--H2内存数据库-->
<h2.version>1.4.200</h2.version>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册