修复底部导航编辑bug

This commit is contained in:
TinyAnts 2022-11-17 12:18:53 +08:00
parent e23cb64f32
commit 2cd73748bb
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,7 @@
package com.mdd.admin.service.impl;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.mdd.admin.service.IDecorateTabbarService;
import com.mdd.admin.validate.DecorateTabsValidate;
@ -45,7 +46,7 @@ public class DecorateTabbarServiceImpl implements IDecorateTabbarService {
vo.setName(tab.getName());
vo.setSelected(UrlUtil.toAbsoluteUrl(tab.getSelected()));
vo.setUnselected(UrlUtil.toAbsoluteUrl(tab.getUnselected()));
vo.setLink(tab.getLink());
vo.setLink(JSON.parse(tab.getLink()));
vo.setCreateTime(TimeUtil.timestampToDate(tab.getCreateTime()));
vo.setUpdateTime(TimeUtil.timestampToDate(tab.getUpdateTime()));
tabList.add(vo);
@ -71,10 +72,9 @@ public class DecorateTabbarServiceImpl implements IDecorateTabbarService {
decorateTabbarMapper.delete(new QueryWrapper<DecorateTabbar>().gt("id", 0));
for (DecorateTabsListsVo obj : tabsValidate.getList()) {
DecorateTabbar model = new DecorateTabbar();
model.setName(obj.getName());
model.setLink(obj.getLink());
model.setLink(JSON.toJSONString(obj.getLink()));
model.setSelected(UrlUtil.toRelativeUrl(obj.getSelected()));
model.setUnselected(UrlUtil.toRelativeUrl(obj.getUnselected()));
model.setCreateTime(System.currentTimeMillis() / 1000);

View File

@ -18,7 +18,7 @@ public class DecorateTabsListsVo implements Serializable {
private String name;
private String selected;
private String unselected;
private String link;
private Object link;
private String createTime;
private String updateTime;