大屏配置
This commit is contained in:
parent
d0cb1cb3be
commit
1b720f5758
@ -118,6 +118,20 @@ public class ScreenAuthController {
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表查询
|
||||
*
|
||||
* @param screenAuth
|
||||
* @return
|
||||
*/
|
||||
@OperLog(operModul = "大屏权限配置管理", operType = "列表查询", operDesc = "树形查询大屏权限配置类型")
|
||||
@ApiOperation(value = " 树形查询大屏权限配置类型", notes = "树形查询大屏权限配置类型", httpMethod = "POST")
|
||||
@PostMapping(value = "/getType")
|
||||
public Result<Object> getType(@RequestBody ScreenAuth screenAuth) {
|
||||
QueryWrapper<ScreenAuth> queryWrapper = QueryGenerator.initQueryWrapper(screenAuth);
|
||||
return Result.success(screenAuthService.getType(queryWrapper));
|
||||
}
|
||||
|
||||
|
||||
|
||||
// /**
|
||||
|
||||
@ -61,7 +61,7 @@ public class ScreenAuth implements Serializable {
|
||||
*/
|
||||
@Excel(name = "下标排序", width = 15)
|
||||
@ApiModelProperty(value = "下标排序")
|
||||
private Integer sortIndex;
|
||||
private String sortIndex;
|
||||
/**
|
||||
* 父级ID
|
||||
*/
|
||||
@ -80,6 +80,14 @@ public class ScreenAuth implements Serializable {
|
||||
@Excel(name = "对应唯一标识", width = 15)
|
||||
@ApiModelProperty(value = "对应唯一标识")
|
||||
private String uniqueFlag;
|
||||
|
||||
/**
|
||||
* 级别
|
||||
*/
|
||||
@Excel(name = "级别", width = 15)
|
||||
@ApiModelProperty(value = "级别")
|
||||
private Integer level;
|
||||
|
||||
/**
|
||||
* 权限类型(1:模版菜单;2:自定义菜单)
|
||||
*/
|
||||
|
||||
@ -47,6 +47,9 @@ public class ScreenAuthDto {
|
||||
@ApiModelProperty(value = "权限类型(1:模版菜单;2:自定义菜单)")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty(value = "级别")
|
||||
private Integer level;
|
||||
|
||||
@ApiModelProperty(value = "子级菜单")
|
||||
private List<ScreenAuthDto> children;
|
||||
}
|
||||
|
||||
@ -20,6 +20,8 @@ public interface IScreenAuthService extends IService<ScreenAuth> {
|
||||
|
||||
List<ScreenAuthDto> treeList(Wrapper<ScreenAuth> wrapper);
|
||||
|
||||
int getType(Wrapper<ScreenAuth> wrapper);
|
||||
|
||||
boolean saveInfo(ScreenAuthVo screenAuthVo);
|
||||
|
||||
boolean delInfo(String id);
|
||||
|
||||
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.*;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.dto.ScreenAuthDto;
|
||||
import com.zhgd.xmgl.modules.basicdata.entity.vo.ScreenAuthVo;
|
||||
@ -93,6 +94,15 @@ public class ScreenAuthServiceImpl extends ServiceImpl<ScreenAuthMapper, ScreenA
|
||||
return treeList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getType(Wrapper<ScreenAuth> wrapper) {
|
||||
List<ScreenAuth> allList = baseMapper.selectPage(new Page<>(1, 1), wrapper).getRecords();
|
||||
if (allList.size() == 0) {
|
||||
return 1;
|
||||
}
|
||||
return allList.get(0).getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean saveInfo(ScreenAuthVo screenAuthVo) {
|
||||
return saveOrUpdate(screenAuthVo.getScreenAuth(), screenAuthVo.getAuthType(), screenAuthVo.getUniqueFlag());
|
||||
@ -247,6 +257,7 @@ public class ScreenAuthServiceImpl extends ServiceImpl<ScreenAuthMapper, ScreenA
|
||||
screenAuthDto.setRoutePath(baseModule.getModulePath());
|
||||
screenAuthDto.setSortIndex(baseModule.getSortIndex());
|
||||
screenAuthDto.setParentId(0L);
|
||||
screenAuthDto.setLevel(1);
|
||||
screenAuthList.add(screenAuthDto);
|
||||
}
|
||||
return screenAuthList;
|
||||
@ -262,6 +273,7 @@ public class ScreenAuthServiceImpl extends ServiceImpl<ScreenAuthMapper, ScreenA
|
||||
screenAuthDto.setRoutePath(baseMenu.getPath());
|
||||
screenAuthDto.setSortIndex(baseMenu.getPriority().toString());
|
||||
screenAuthDto.setParentId(baseMenu.getModuleId());
|
||||
screenAuthDto.setLevel(2);
|
||||
screenAuthList.add(screenAuthDto);
|
||||
}
|
||||
return screenAuthList;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user