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

ibiz4j 发布系统代码 [ibz-ou,统一组织单位]

上级 d81a2c78
......@@ -27,6 +27,13 @@ import cn.ibizlab.core.ou.domain.SysEmployee;
@Data
public class SysEmployeeSearchContext extends QueryWrapperContext<SysEmployee> {
private String n_userid_in;//[用户标识]
public void setN_userid_in(String n_userid_in) {
this.n_userid_in = n_userid_in;
if(!ObjectUtils.isEmpty(this.n_userid_in)){
this.getSearchCond().in("userid",this.n_userid_in.split(";"));
}
}
private String n_username_eq;//[用户全局名]
public void setN_username_eq(String n_username_eq) {
this.n_username_eq = n_username_eq;
......
......@@ -59,6 +59,9 @@ public class SysDepartmentServiceImpl extends ServiceImpl<SysDepartmentMapper, S
@Autowired
@Lazy
protected cn.ibizlab.core.ou.service.ISysOrganizationService sysorganizationService;
@Autowired
@Lazy
ISysDepartmentService proxyService;
protected int batchSize = 500;
......@@ -155,7 +158,7 @@ public class SysDepartmentServiceImpl extends ServiceImpl<SysDepartmentMapper, 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);
}
}
......@@ -163,7 +166,21 @@ public class SysDepartmentServiceImpl extends ServiceImpl<SysDepartmentMapper, S
@Transactional
public boolean saveBatch(Collection<SysDepartment> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
List<SysDepartment> create = new ArrayList<>();
List<SysDepartment> update = new ArrayList<>();
for (SysDepartment et : list) {
if (ObjectUtils.isEmpty(et.getDeptid()) || ObjectUtils.isEmpty(getById(et.getDeptid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
return true;
}
......@@ -171,7 +188,21 @@ public class SysDepartmentServiceImpl extends ServiceImpl<SysDepartmentMapper, S
@Transactional
public void saveBatch(List<SysDepartment> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
List<SysDepartment> create = new ArrayList<>();
List<SysDepartment> update = new ArrayList<>();
for (SysDepartment et : list) {
if (ObjectUtils.isEmpty(et.getDeptid()) || ObjectUtils.isEmpty(getById(et.getDeptid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
}
......@@ -203,9 +234,6 @@ public class SysDepartmentServiceImpl extends ServiceImpl<SysDepartmentMapper, S
this.remove(new QueryWrapper<SysDepartment>().eq("orgid",orgid));
}
@Autowired
@Lazy
ISysDepartmentService proxyService;
@Override
public void saveByOrgid(String orgid,List<SysDepartment> list) {
if(list==null)
......
......@@ -57,6 +57,9 @@ public class SysDeptMemberServiceImpl extends ServiceImpl<SysDeptMemberMapper, S
@Autowired
@Lazy
protected cn.ibizlab.core.ou.service.ISysPostService syspostService;
@Autowired
@Lazy
ISysDeptMemberService proxyService;
protected int batchSize = 500;
......@@ -147,7 +150,7 @@ public class SysDeptMemberServiceImpl extends ServiceImpl<SysDeptMemberMapper, 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);
}
}
......@@ -155,7 +158,21 @@ public class SysDeptMemberServiceImpl extends ServiceImpl<SysDeptMemberMapper, S
@Transactional
public boolean saveBatch(Collection<SysDeptMember> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
List<SysDeptMember> create = new ArrayList<>();
List<SysDeptMember> update = new ArrayList<>();
for (SysDeptMember et : list) {
if (ObjectUtils.isEmpty(et.getMemberid()) || ObjectUtils.isEmpty(getById(et.getMemberid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
return true;
}
......@@ -163,7 +180,21 @@ public class SysDeptMemberServiceImpl extends ServiceImpl<SysDeptMemberMapper, S
@Transactional
public void saveBatch(List<SysDeptMember> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
List<SysDeptMember> create = new ArrayList<>();
List<SysDeptMember> update = new ArrayList<>();
for (SysDeptMember et : list) {
if (ObjectUtils.isEmpty(et.getMemberid()) || ObjectUtils.isEmpty(getById(et.getMemberid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
}
......
......@@ -63,6 +63,9 @@ public class SysEmployeeServiceImpl extends ServiceImpl<SysEmployeeMapper, SysEm
@Autowired
@Lazy
protected cn.ibizlab.core.ou.service.ISysPostService syspostService;
@Autowired
@Lazy
ISysEmployeeService proxyService;
protected int batchSize = 500;
......@@ -169,7 +172,7 @@ public class SysEmployeeServiceImpl extends ServiceImpl<SysEmployeeMapper, SysEm
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
return checkKey(et) ? proxyService.update(et) : proxyService.create(et);
}
}
......@@ -177,7 +180,21 @@ public class SysEmployeeServiceImpl extends ServiceImpl<SysEmployeeMapper, SysEm
@Transactional
public boolean saveBatch(Collection<SysEmployee> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
List<SysEmployee> create = new ArrayList<>();
List<SysEmployee> update = new ArrayList<>();
for (SysEmployee 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;
}
......@@ -185,7 +202,21 @@ public class SysEmployeeServiceImpl extends ServiceImpl<SysEmployeeMapper, SysEm
@Transactional
public void saveBatch(List<SysEmployee> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
List<SysEmployee> create = new ArrayList<>();
List<SysEmployee> update = new ArrayList<>();
for (SysEmployee 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);
}
}
......
......@@ -56,6 +56,9 @@ public class SysOrganizationServiceImpl extends ServiceImpl<SysOrganizationMappe
protected cn.ibizlab.core.ou.service.ISysEmployeeService sysemployeeService;
protected cn.ibizlab.core.ou.service.ISysOrganizationService sysorganizationService = this;
@Autowired
@Lazy
ISysOrganizationService proxyService;
protected int batchSize = 500;
......@@ -160,7 +163,7 @@ public class SysOrganizationServiceImpl extends ServiceImpl<SysOrganizationMappe
if (null == et) {
return false;
} else {
return checkKey(et) ? this.update(et) : this.create(et);
return checkKey(et) ? proxyService.update(et) : proxyService.create(et);
}
}
......@@ -168,7 +171,21 @@ public class SysOrganizationServiceImpl extends ServiceImpl<SysOrganizationMappe
@Transactional
public boolean saveBatch(Collection<SysOrganization> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
List<SysOrganization> create = new ArrayList<>();
List<SysOrganization> update = new ArrayList<>();
for (SysOrganization et : list) {
if (ObjectUtils.isEmpty(et.getOrgid()) || ObjectUtils.isEmpty(getById(et.getOrgid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
return true;
}
......@@ -176,7 +193,21 @@ public class SysOrganizationServiceImpl extends ServiceImpl<SysOrganizationMappe
@Transactional
public void saveBatch(List<SysOrganization> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
List<SysOrganization> create = new ArrayList<>();
List<SysOrganization> update = new ArrayList<>();
for (SysOrganization et : list) {
if (ObjectUtils.isEmpty(et.getOrgid()) || ObjectUtils.isEmpty(getById(et.getOrgid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
}
......
......@@ -57,6 +57,9 @@ public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPost> impl
@Autowired
@Lazy
protected cn.ibizlab.core.ou.service.ISysTeamMemberService systeammemberService;
@Autowired
@Lazy
ISysPostService proxyService;
protected int batchSize = 500;
......@@ -142,21 +145,49 @@ public class SysPostServiceImpl extends ServiceImpl<SysPostMapper, SysPost> 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<SysPost> list) {
saveOrUpdateBatch(list,batchSize);
List<SysPost> create = new ArrayList<>();
List<SysPost> update = new ArrayList<>();
for (SysPost et : list) {
if (ObjectUtils.isEmpty(et.getPostid()) || ObjectUtils.isEmpty(getById(et.getPostid()))) {
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<SysPost> list) {
saveOrUpdateBatch(list,batchSize);
List<SysPost> create = new ArrayList<>();
List<SysPost> update = new ArrayList<>();
for (SysPost et : list) {
if (ObjectUtils.isEmpty(et.getPostid()) || ObjectUtils.isEmpty(getById(et.getPostid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
}
......
......@@ -57,6 +57,9 @@ public class SysTeamMemberServiceImpl extends ServiceImpl<SysTeamMemberMapper, S
@Autowired
@Lazy
protected cn.ibizlab.core.ou.service.ISysTeamService systeamService;
@Autowired
@Lazy
ISysTeamMemberService proxyService;
protected int batchSize = 500;
......@@ -147,7 +150,7 @@ public class SysTeamMemberServiceImpl extends ServiceImpl<SysTeamMemberMapper, 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);
}
}
......@@ -155,7 +158,21 @@ public class SysTeamMemberServiceImpl extends ServiceImpl<SysTeamMemberMapper, S
@Transactional
public boolean saveBatch(Collection<SysTeamMember> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
List<SysTeamMember> create = new ArrayList<>();
List<SysTeamMember> update = new ArrayList<>();
for (SysTeamMember et : list) {
if (ObjectUtils.isEmpty(et.getTeammemberid()) || ObjectUtils.isEmpty(getById(et.getTeammemberid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
return true;
}
......@@ -163,7 +180,21 @@ public class SysTeamMemberServiceImpl extends ServiceImpl<SysTeamMemberMapper, S
@Transactional
public void saveBatch(List<SysTeamMember> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
List<SysTeamMember> create = new ArrayList<>();
List<SysTeamMember> update = new ArrayList<>();
for (SysTeamMember et : list) {
if (ObjectUtils.isEmpty(et.getTeammemberid()) || ObjectUtils.isEmpty(getById(et.getTeammemberid()))) {
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 SysTeamServiceImpl extends ServiceImpl<SysTeamMapper, SysTeam> impl
@Autowired
@Lazy
protected cn.ibizlab.core.ou.service.ISysTeamMemberService systeammemberService;
@Autowired
@Lazy
ISysTeamService proxyService;
protected int batchSize = 500;
......@@ -136,21 +139,49 @@ public class SysTeamServiceImpl extends ServiceImpl<SysTeamMapper, SysTeam> 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<SysTeam> list) {
saveOrUpdateBatch(list,batchSize);
List<SysTeam> create = new ArrayList<>();
List<SysTeam> update = new ArrayList<>();
for (SysTeam et : list) {
if (ObjectUtils.isEmpty(et.getTeamid()) || ObjectUtils.isEmpty(getById(et.getTeamid()))) {
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<SysTeam> list) {
saveOrUpdateBatch(list,batchSize);
List<SysTeam> create = new ArrayList<>();
List<SysTeam> update = new ArrayList<>();
for (SysTeam et : list) {
if (ObjectUtils.isEmpty(et.getTeamid()) || ObjectUtils.isEmpty(getById(et.getTeamid()))) {
create.add(et);
} else {
update.add(et);
}
}
if (create.size() > 0) {
proxyService.createBatch(create);
}
if (update.size() > 0) {
proxyService.updateBatch(update);
}
}
......
......@@ -60,7 +60,7 @@
<!--输出实体[SYS_EMP]数据结构 -->
<changeSet author="a_A_5d9d78509" id="tab-sys_emp-77-3">
<changeSet author="a_A_5d9d78509" id="tab-sys_emp-78-3">
<createTable tableName="IBZEMP">
<column name="USERID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_SYS_EMP_USERID"/>
......@@ -238,13 +238,13 @@
<addForeignKeyConstraint baseColumnNames="POSTID" baseTableName="IBZDEPTMEMBER" constraintName="DER1N_SYS_DEPTMEMBER_SYS_POST_" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="POSTID" referencedTableName="IBZPOST" validate="true"/>
</changeSet>
<!--输出实体[SYS_EMP]外键关系 -->
<changeSet author="a_A_5d9d78509" id="fk-sys_emp-77-13">
<changeSet author="a_A_5d9d78509" id="fk-sys_emp-78-13">
<addForeignKeyConstraint baseColumnNames="MDEPTID" baseTableName="IBZEMP" constraintName="DER1N_SYS_EMP_SYS_DEPT_MDEPTID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="DEPTID" referencedTableName="IBZDEPT" validate="true"/>
</changeSet>
<changeSet author="a_A_5d9d78509" id="fk-sys_emp-77-14">
<changeSet author="a_A_5d9d78509" id="fk-sys_emp-78-14">
<addForeignKeyConstraint baseColumnNames="ORGID" baseTableName="IBZEMP" constraintName="DER1N_SYS_EMP_SYS_ORG_ORGID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="ORGID" referencedTableName="IBZORG" validate="true"/>
</changeSet>
<changeSet author="a_A_5d9d78509" id="fk-sys_emp-77-15">
<changeSet author="a_A_5d9d78509" id="fk-sys_emp-78-15">
<addForeignKeyConstraint baseColumnNames="POSTID" baseTableName="IBZEMP" constraintName="DER1N_SYS_EMP_SYS_POST_POSTID" deferrable="false" initiallyDeferred="false" onDelete="RESTRICT" onUpdate="RESTRICT" referencedColumnNames="POSTID" referencedTableName="IBZPOST" validate="true"/>
</changeSet>
<!--输出实体[SYS_ORG]外键关系 -->
......
......@@ -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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册