Commit 3d3997c6 by 阳浪

4.21bug优化

parent a1741649
...@@ -186,19 +186,21 @@ public class TpPlanActivityServiceImpl extends ServiceImpl<TpPlanActivityMapper, ...@@ -186,19 +186,21 @@ public class TpPlanActivityServiceImpl extends ServiceImpl<TpPlanActivityMapper,
if (null != tpPlanActivityEW) { if (null != tpPlanActivityEW) {
// 查出TPplanId 下的 活动 // 查出TPplanId 下的 活动
tpPlanActivityEW.setDeleted(ProjectConstant.DELETED_NO); tpPlanActivityEW.setDeleted(ProjectConstant.DELETED_NO);
tpPlanActivityEW.setTpPlanId(tpPlanActivity.getTpPlanId()); if(tpPlanActivity.getTpPlanId()!=null) {
ew = new EntityWrapper<>(tpPlanActivityEW); tpPlanActivityEW.setTpPlanId(tpPlanActivity.getTpPlanId());
ew.orderBy("sort", true); ew = new EntityWrapper<>(tpPlanActivityEW);
List<TpPlanActivity> activities = tpPlanActivityMapper.selectList(ew); ew.orderBy("sort", true);
if (!CollectionUtils.isEmpty(activities)) { List<TpPlanActivity> activities = tpPlanActivityMapper.selectList(ew);
// 更新活动排序 if (!CollectionUtils.isEmpty(activities)) {
TpPlanActivity activity = new TpPlanActivity(); // 更新活动排序
int index = 0; TpPlanActivity activity = new TpPlanActivity();
for (TpPlanActivity a : activities) { int index = 0;
index++; for (TpPlanActivity a : activities) {
activity.setId(a.getId()); index++;
activity.setSort(index); activity.setId(a.getId());
activity.updateById(); activity.setSort(index);
activity.updateById();
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment