领用驳回优化
This commit is contained in:
parent
83bde9d6b1
commit
dfdc2e8340
|
|
@ -1046,19 +1046,22 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
|||
//查询是否有newType
|
||||
List<LeaseApplyDetails> list = mapper.selectTypeByNewType(leaseApplyDetails);
|
||||
int result = 0;
|
||||
if (!CollectionUtils.isEmpty(list) && list.size() > 1) {
|
||||
for (LeaseApplyDetails applyDetails : list) {
|
||||
result = mapper.updatePublishSub(applyDetails);
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
if (list.size() > 1) {
|
||||
for (LeaseApplyDetails applyDetails : list) {
|
||||
result = mapper.updatePublishSub(applyDetails);
|
||||
if (result == 0) {
|
||||
return AjaxResult.error("发布驳回失败,请联系管理员");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 根据parentId及typeId更新lease_apply_details表的发布数量
|
||||
leaseApplyDetails.setTypeId(list.get(0).getTypeId());
|
||||
result = mapper.updatePublishSub(leaseApplyDetails);
|
||||
if (result == 0) {
|
||||
return AjaxResult.error("发布驳回失败,请联系管理员");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 根据parentId及typeId更新lease_apply_details表的发布数量
|
||||
result = mapper.updatePublishSub(leaseApplyDetails);
|
||||
if (result == 0) {
|
||||
return AjaxResult.error("发布驳回失败,请联系管理员");
|
||||
}
|
||||
}
|
||||
|
||||
// 根据parentId及newTypeId删除lease_publish_details
|
||||
|
|
|
|||
Loading…
Reference in New Issue