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

ibiz4j 发布系统代码 [ibz-wf,统一工作流]

上级 eabd981f
......@@ -51,6 +51,9 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> impl
@Autowired
@Lazy
protected cn.ibizlab.core.workflow.service.IWFMemberService wfmemberService;
@Autowired
@Lazy
IWFGroupService proxyService;
protected int batchSize = 500;
......@@ -140,21 +143,49 @@ public class WFGroupServiceImpl extends ServiceImpl<WFGroupMapper, WFGroup> 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<WFGroup> list) {
saveOrUpdateBatch(list,batchSize);
List<WFGroup> create = new ArrayList<>();
List<WFGroup> update = new ArrayList<>();
for (WFGroup 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<WFGroup> list) {
saveOrUpdateBatch(list,batchSize);
List<WFGroup> create = new ArrayList<>();
List<WFGroup> update = new ArrayList<>();
for (WFGroup 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 WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
@Autowired
@Lazy
protected cn.ibizlab.core.workflow.service.IWFUserService wfuserService;
@Autowired
@Lazy
IWFMemberService proxyService;
protected int batchSize = 500;
......@@ -144,7 +147,7 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
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 WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
@Transactional
public boolean saveBatch(Collection<WFMember> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
List<WFMember> create = new ArrayList<>();
List<WFMember> update = new ArrayList<>();
for (WFMember 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;
}
......@@ -160,7 +177,21 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
@Transactional
public void saveBatch(List<WFMember> list) {
list.forEach(item->fillParentData(item));
saveOrUpdateBatch(list,batchSize);
List<WFMember> create = new ArrayList<>();
List<WFMember> update = new ArrayList<>();
for (WFMember 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);
}
}
......@@ -173,9 +204,6 @@ public class WFMemberServiceImpl extends ServiceImpl<WFMemberMapper, WFMember> i
this.remove(new QueryWrapper<WFMember>().eq("groupid",id));
}
@Autowired
@Lazy
IWFMemberService proxyService;
@Override
public void saveByGroupid(String id,List<WFMember> list) {
if(list==null)
......
......@@ -48,6 +48,9 @@ import org.springframework.util.StringUtils;
@Service("WFProcessDefinitionServiceImpl")
public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinitionMapper, WFProcessDefinition> implements IWFProcessDefinitionService {
@Autowired
@Lazy
IWFProcessDefinitionService proxyService;
protected int batchSize = 500;
......@@ -133,21 +136,49 @@ public class WFProcessDefinitionServiceImpl extends ServiceImpl<WFProcessDefinit
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<WFProcessDefinition> list) {
saveOrUpdateBatch(list,batchSize);
List<WFProcessDefinition> create = new ArrayList<>();
List<WFProcessDefinition> update = new ArrayList<>();
for (WFProcessDefinition et : list) {
if (ObjectUtils.isEmpty(et.getDefinitionkey()) || ObjectUtils.isEmpty(getById(et.getDefinitionkey()))) {
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<WFProcessDefinition> list) {
saveOrUpdateBatch(list,batchSize);
List<WFProcessDefinition> create = new ArrayList<>();
List<WFProcessDefinition> update = new ArrayList<>();
for (WFProcessDefinition et : list) {
if (ObjectUtils.isEmpty(et.getDefinitionkey()) || ObjectUtils.isEmpty(getById(et.getDefinitionkey()))) {
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("WFSystemServiceImpl")
public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> implements IWFSystemService {
@Autowired
@Lazy
IWFSystemService proxyService;
protected int batchSize = 500;
......@@ -133,21 +136,49 @@ public class WFSystemServiceImpl extends ServiceImpl<WFSystemMapper, WFSystem> i
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<WFSystem> list) {
saveOrUpdateBatch(list,batchSize);
List<WFSystem> create = new ArrayList<>();
List<WFSystem> update = new ArrayList<>();
for (WFSystem 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<WFSystem> list) {
saveOrUpdateBatch(list,batchSize);
List<WFSystem> create = new ArrayList<>();
List<WFSystem> update = new ArrayList<>();
for (WFSystem 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);
}
}
......
......@@ -51,6 +51,9 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
@Autowired
@Lazy
protected cn.ibizlab.core.workflow.service.IWFMemberService wfmemberService;
@Autowired
@Lazy
IWFUserService proxyService;
protected int batchSize = 500;
......@@ -136,21 +139,49 @@ public class WFUserServiceImpl extends ServiceImpl<WFUserMapper, WFUser> impleme
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<WFUser> list) {
saveOrUpdateBatch(list,batchSize);
List<WFUser> create = new ArrayList<>();
List<WFUser> update = new ArrayList<>();
for (WFUser 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<WFUser> list) {
saveOrUpdateBatch(list,batchSize);
List<WFUser> create = new ArrayList<>();
List<WFUser> update = new ArrayList<>();
for (WFUser 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);
}
}
......
......@@ -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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册