|
@@ -16,6 +16,7 @@ import java.util.Date;
|
16
|
16
|
import java.util.HashMap;
|
17
|
17
|
import java.util.List;
|
18
|
18
|
import java.util.Map;
|
|
19
|
+import java.util.concurrent.atomic.AtomicReference;
|
19
|
20
|
|
20
|
21
|
/**
|
21
|
22
|
* @author FXF
|
|
@@ -153,6 +154,7 @@ public class CommunityServiceImpl implements CommunityServiceI {
|
153
|
154
|
*/
|
154
|
155
|
private void addAppMenu(Integer communityId) {
|
155
|
156
|
List<TaSysMenu> list = taSysMenuMapper.getTaSysMenuListByCommunityId();
|
|
157
|
+ AtomicReference<Integer> menuIndex = new AtomicReference<>(1);
|
156
|
158
|
list.stream().forEach(e -> {
|
157
|
159
|
//插入APP菜单
|
158
|
160
|
TaSysMenu taSysMenu = new TaSysMenu();
|
|
@@ -164,6 +166,9 @@ public class CommunityServiceImpl implements CommunityServiceI {
|
164
|
166
|
taSysMenu.setRemark(e.getRemark());
|
165
|
167
|
taSysMenu.setSort(e.getSort());
|
166
|
168
|
taSysMenu.setStatus("0");
|
|
169
|
+ if (menuIndex.get() > 8) {
|
|
170
|
+ taSysMenu.setStatus("1");
|
|
171
|
+ }
|
167
|
172
|
taSysMenuMapper.insertTaSysMenu(taSysMenu);
|
168
|
173
|
//插入图标
|
169
|
174
|
List<TaSysMenuImg> imgList = taSysMenuMapper.selectTaSysMenuImgById(e.getId());
|
|
@@ -171,6 +176,8 @@ public class CommunityServiceImpl implements CommunityServiceI {
|
171
|
176
|
img.setTaMenuId(taSysMenu.getId());
|
172
|
177
|
});
|
173
|
178
|
taSysMenuMapper.batchInsertImg(imgList);
|
|
179
|
+
|
|
180
|
+ menuIndex.getAndSet(menuIndex.get() + 1);
|
174
|
181
|
});
|
175
|
182
|
|
176
|
183
|
}
|