领用驳回优化

This commit is contained in:
mashuai 2025-11-04 16:52:59 +08:00
parent 83bde9d6b1
commit dfdc2e8340
1 changed files with 12 additions and 9 deletions

View File

@ -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