forked from github/dataease
Merge remote-tracking branch 'origin/main' into main
This commit is contained in:
commit
5f5dc3daa3
@ -14,7 +14,7 @@
|
|||||||
<select id="query" parameterType="io.dataease.base.mapper.ext.query.GridExample" resultMap="panelStoreMap">
|
<select id="query" parameterType="io.dataease.base.mapper.ext.query.GridExample" resultMap="panelStoreMap">
|
||||||
select s.store_id,s.panel_group_id, g.name
|
select s.store_id,s.panel_group_id, g.name
|
||||||
from panel_store s
|
from panel_store s
|
||||||
left join panel_group g on g.id = s.panel_group_id
|
inner join panel_group g on g.id = s.panel_group_id
|
||||||
<if test="_parameter != null">
|
<if test="_parameter != null">
|
||||||
<include refid="io.dataease.base.mapper.ext.query.GridSql.gridCondition" />
|
<include refid="io.dataease.base.mapper.ext.query.GridSql.gridCondition" />
|
||||||
</if>
|
</if>
|
||||||
|
@ -8,13 +8,14 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="allNodes" resultMap="simpleNode">
|
<select id="allNodes" resultMap="simpleNode">
|
||||||
select menu_id as id, pid from sys_menu
|
select menu_id as id, pid from sys_menu where hidden != 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<select id="nodesByExample" parameterType="io.dataease.base.mapper.ext.query.GridExample" resultMap="simpleNode">
|
<select id="nodesByExample" parameterType="io.dataease.base.mapper.ext.query.GridExample" resultMap="simpleNode">
|
||||||
select menu_id as id, pid from sys_menu
|
select menu_id as id, pid from sys_menu
|
||||||
<include refid="io.dataease.base.mapper.ext.query.GridSql.gridCondition" />
|
<include refid="io.dataease.base.mapper.ext.query.GridSql.gridCondition" />
|
||||||
|
and hidden != 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ import org.apache.commons.collections4.CollectionUtils;
|
|||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
@ -45,14 +46,15 @@ public class PanelGroupService {
|
|||||||
@Resource
|
@Resource
|
||||||
private ExtPanelGroupMapper extPanelGroupMapper;
|
private ExtPanelGroupMapper extPanelGroupMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private PanelDesignMapper panelDesignMapper;
|
|
||||||
@Resource
|
|
||||||
private ChartViewService chartViewService;
|
private ChartViewService chartViewService;
|
||||||
@Resource
|
@Resource
|
||||||
private ChartViewMapper chartViewMapper;
|
private ChartViewMapper chartViewMapper;
|
||||||
@Resource
|
@Resource
|
||||||
private ExtPanelDesignMapper extPanelDesignMapper;
|
private StoreService storeService;
|
||||||
|
@Resource
|
||||||
|
private ShareService shareService;
|
||||||
|
@Resource
|
||||||
|
private PanelLinkService panelLinkService;
|
||||||
public List<PanelGroupDTO> tree(PanelGroupRequest panelGroupRequest) {
|
public List<PanelGroupDTO> tree(PanelGroupRequest panelGroupRequest) {
|
||||||
String userId = String.valueOf(AuthUtils.getUser().getUserId());
|
String userId = String.valueOf(AuthUtils.getUser().getUserId());
|
||||||
panelGroupRequest.setUserId(userId);
|
panelGroupRequest.setUserId(userId);
|
||||||
@ -93,6 +95,9 @@ public class PanelGroupService {
|
|||||||
public void deleteCircle(String id) {
|
public void deleteCircle(String id) {
|
||||||
Assert.notNull(id, "id cannot be null");
|
Assert.notNull(id, "id cannot be null");
|
||||||
extPanelGroupMapper.deleteCircle(id);
|
extPanelGroupMapper.deleteCircle(id);
|
||||||
|
storeService.removeByPanelId(id);
|
||||||
|
shareService.delete(id, null);
|
||||||
|
panelLinkService.deleteByResourceId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,6 +73,10 @@ public class PanelLinkService {
|
|||||||
return convertDto(one);
|
return convertDto(one);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void deleteByResourceId(String resourceId){
|
||||||
|
mapper.deleteByPrimaryKey(resourceId);
|
||||||
|
}
|
||||||
|
|
||||||
public String decryptParam(String text) throws Exception {
|
public String decryptParam(String text) throws Exception {
|
||||||
return RsaUtil.decryptByPrivateKey(RsaProperties.privateKey, text);
|
return RsaUtil.decryptByPrivateKey(RsaProperties.privateKey, text);
|
||||||
}
|
}
|
||||||
@ -100,7 +104,6 @@ public class PanelLinkService {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
System.out.println(s);
|
|
||||||
return encrypt;
|
return encrypt;
|
||||||
}
|
}
|
||||||
private GenerateDto convertDto(PanelLink linl){
|
private GenerateDto convertDto(PanelLink linl){
|
||||||
|
@ -76,7 +76,11 @@ public class ShareService {
|
|||||||
@Transactional
|
@Transactional
|
||||||
public void delete(String panel_group_id, Integer type){
|
public void delete(String panel_group_id, Integer type){
|
||||||
PanelShareExample example = new PanelShareExample();
|
PanelShareExample example = new PanelShareExample();
|
||||||
example.createCriteria().andPanelGroupIdEqualTo(panel_group_id).andTypeEqualTo(type);
|
PanelShareExample.Criteria criteria = example.createCriteria();
|
||||||
|
criteria.andPanelGroupIdEqualTo(panel_group_id);
|
||||||
|
if(type != null){
|
||||||
|
criteria.andTypeEqualTo(type);
|
||||||
|
}
|
||||||
mapper.deleteByExample(example);
|
mapper.deleteByExample(example);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ public class MenuService {
|
|||||||
private MenuTreeNode format(SysMenu sysMenu) {
|
private MenuTreeNode format(SysMenu sysMenu) {
|
||||||
MenuTreeNode menuTreeNode = new MenuTreeNode();
|
MenuTreeNode menuTreeNode = new MenuTreeNode();
|
||||||
menuTreeNode.setId(sysMenu.getMenuId());
|
menuTreeNode.setId(sysMenu.getMenuId());
|
||||||
menuTreeNode.setLabel(sysMenu.getName());
|
menuTreeNode.setLabel(sysMenu.getTitle());
|
||||||
menuTreeNode.setHasChildren(false);
|
menuTreeNode.setHasChildren(false);
|
||||||
Optional.ofNullable(sysMenu.getMenuSort()).ifPresent(num -> menuTreeNode.setHasChildren(num > 0));
|
Optional.ofNullable(sysMenu.getMenuSort()).ifPresent(num -> menuTreeNode.setHasChildren(num > 0));
|
||||||
return menuTreeNode;
|
return menuTreeNode;
|
||||||
|
Loading…
Reference in New Issue
Block a user