diff --git a/renren-admin/src/main/java/io/renren/common/controller/CensusController.java b/renren-admin/src/main/java/io/renren/common/controller/CensusController.java index 83ab710e..8b1b3b22 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/CensusController.java +++ b/renren-admin/src/main/java/io/renren/common/controller/CensusController.java @@ -16,6 +16,8 @@ import io.renren.modules.resource.excel.census.config.CustomCellWriteHeightConfi import io.renren.modules.resource.excel.census.config.CustomCellWriteWeightConfig; import io.renren.modules.resource.service.ResourceService; import io.renren.modules.resourceBrowse.service.ResourceBrowseService; +import io.renren.modules.security.user.SecurityUser; +import io.renren.modules.security.user.UserDetail; import io.renren.modules.sys.dto.SysDeptDTO; import io.renren.modules.sys.service.SysDeptService; import io.renren.modules.sys.service.SysUserService; @@ -472,9 +474,18 @@ public class CensusController { @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "type", value = "资源类型", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "deptId", value = "所属部门", paramType = "query", dataType = "long"), + @ApiImplicitParam(name = "resourceName", value = "资源名称", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "approveStatus", value = "审核状态,可选值(通过、审核中)", paramType = "query", dataType = "String"), }) public Result selectCensusResourceTable(@RequestParam Map params) { + UserDetail user = SecurityUser.getUser(); + if (user.getDeptId() != null) { + SysDeptDTO sysDeptDTO = sysDeptService.get(user.getDeptId()); + params.put("region", sysDeptDTO.getDistrict()); // 管理员只出本部门区域 + } +// else if (SuperAdminEnum.YES.value() == user.getSuperAdmin()) { // 超级管理员 +// +// } return new Result().ok(resourceService.selectCensusResourceTable(params)); } @@ -489,6 +500,14 @@ public class CensusController { @ApiImplicitParam(name = "approveStatus", value = "审核状态,可选值(通过、审核中)", paramType = "query", dataType = "String"), }) public void exportSelectCensusResourceTable(@RequestParam Map params, HttpServletResponse response) throws IOException { + UserDetail user = SecurityUser.getUser(); + if (user.getDeptId() != null) { + SysDeptDTO sysDeptDTO = sysDeptService.get(user.getDeptId()); + params.put("region", sysDeptDTO.getDistrict()); // 管理员只出本部门区域 + } +// else if (user.getSuperAdmin() == SuperAdminEnum.YES.value()) { // 超级管理员 +// +// } ArrayList resultList = (ArrayList) resourceDao.selectCensusResourceTable(params); List> date = resultList.stream().map(index -> { List data = new ArrayList<>(); @@ -539,9 +558,18 @@ public class CensusController { @ApiImplicitParam(name = "endDate", value = "结束时间", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "type", value = "资源类型", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "deptId", value = "所属部门", paramType = "query", dataType = "long"), + @ApiImplicitParam(name = "resourceName", value = "资源名称", paramType = "query", dataType = "String"), @ApiImplicitParam(name = "approveStatus", value = "审核状态,可选值(通过、审核中)", paramType = "query", dataType = "String"), }) public Result selectCensusApplyTable(@RequestParam Map params) { + UserDetail user = SecurityUser.getUser(); + if (user.getDeptId() != null) { + SysDeptDTO sysDeptDTO = sysDeptService.get(user.getDeptId()); + params.put("region", sysDeptDTO.getDistrict()); // 管理员只出本部门区域 + } +// else if (user.getSuperAdmin() == SuperAdminEnum.YES.value()) { // 超级管理员 +// +// } return new Result().ok(resourceService.selectCensusApplyTable(params)); } @@ -556,6 +584,14 @@ public class CensusController { @ApiImplicitParam(name = "approveStatus", value = "审核状态,可选值(通过、审核中)", paramType = "query", dataType = "String"), }) public void exportSelectCensusApplyTable(@RequestParam Map params, HttpServletResponse response) throws IOException { + UserDetail user = SecurityUser.getUser(); + if (user.getDeptId() != null) { + SysDeptDTO sysDeptDTO = sysDeptService.get(user.getDeptId()); + params.put("region", sysDeptDTO.getDistrict()); // 管理员只出本部门区域 + } +// else if (user.getSuperAdmin() == SuperAdminEnum.YES.value()) { // 超级管理员 +// +// } ArrayList resultList = (ArrayList) resourceDao.selectCensusApplyTable(params); List> date = resultList.stream().map(index -> { List data = new ArrayList<>(); diff --git a/renren-admin/src/main/java/io/renren/modules/log/service/impl/SysLogOperationServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/log/service/impl/SysLogOperationServiceImpl.java index f6e2dfde..23507047 100644 --- a/renren-admin/src/main/java/io/renren/modules/log/service/impl/SysLogOperationServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/log/service/impl/SysLogOperationServiceImpl.java @@ -56,14 +56,14 @@ public class SysLogOperationServiceImpl extends BaseServiceImpl - wrapper.like("request_uri", "/renren-admin/resource%/insert") + wrapper.like("request_uri", "/ucs-admin/resource%/insert") .or() - .like("request_uri", "/renren-admin/resource%/update") + .like("request_uri", "/ucs-admin/resource%/update") .or() - .like("request_uri", "/renren-admin/resource%/delete")); + .like("request_uri", "/ucs-admin/resource%/delete")); } else { queryWrapper.like(StringUtils.isNotBlank(operationType), "request_uri", operationType); } diff --git a/renren-admin/src/main/java/io/renren/modules/notice/service/impl/SysNoticeServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/notice/service/impl/SysNoticeServiceImpl.java index 17ba31e3..cc017413 100644 --- a/renren-admin/src/main/java/io/renren/modules/notice/service/impl/SysNoticeServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/notice/service/impl/SysNoticeServiceImpl.java @@ -29,6 +29,7 @@ import org.apache.shiro.session.UnknownSessionException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; @@ -65,6 +66,9 @@ public class SysNoticeServiceImpl extends CrudServiceImpl getWrapper(Map params) { QueryWrapper wrapper = new QueryWrapper<>(); @@ -212,10 +216,14 @@ public class SysNoticeServiceImpl extends CrudServiceImpl message = new MessageData().msg(notice.getTitle()); webSocketServer.sendMessage(finalUserIdList, message); }, executor).thenRunAsync(() -> { - try { - sendToYaweiUser(notice, finalUserIdList); - } catch (Exception exception) { - logger.error("", exception); + if (noticeYaWei) { + try { + sendToYaweiUser(notice, finalUserIdList); + } catch (Exception exception) { + logger.error("", exception); + } + } else { + logger.info("无需发送到第三方 亚微消息"); } }, executor); } diff --git a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java index def0c19a..9fe3bd84 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java @@ -203,6 +203,7 @@ public class ResourceController { List ids = jdbcTemplate.queryForList("SELECT id FROM tb_data_resource", Long.class); ids.forEach(id -> { ResourceDTO data = resourceService.selectWithAttrs(id); + data.setUpdateDate(new Date()); resourceService.update(data); }); }, executor); @@ -718,4 +719,12 @@ public class ResourceController { return new Result().ok(resourceService.getSquareList(jsonObject)); } + @GetMapping("/getAppListByDept") + @ApiOperation("/根据部门查询部门上架应用列表") + @LogOperation("/根据部门查询部门上架应用列表") + public Result getAppListByDept(String key) { + return new Result().ok(resourceService.getAppListByDept(key)); + } + + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java b/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java index 22682303..9104e9f2 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java @@ -19,6 +19,8 @@ import java.util.Map; */ @Mapper public interface ResourceDao extends BaseDao { + static final String selectCensusResourceTableKey = "selectCensusResourceTable"; + static final String selectCensusApplyTableKey = "selectCensusApplyTable"; Integer deleteByIds(@Param("ids") List idList); @@ -193,8 +195,10 @@ public interface ResourceDao extends BaseDao { List> selectDeptDetailTypeCountList(Map params); + @Cacheable(value = selectCensusResourceTableKey, key = "#p0") List selectCensusResourceTable(Map params); + @Cacheable(value = selectCensusApplyTableKey, key = "#p0") List selectCensusApplyTable(Map params); List selectCollectList(@Param("resourceType") String resourceType, @Param("attrType") String attrType); @@ -215,4 +219,6 @@ public interface ResourceDao extends BaseDao { @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize); Integer getSquareListCount(@Param("type") String type, @Param("deptType") Integer deptType, @Param("area") String area); + + List getAppListByDept(@Param("deptId") Long deptId, @Param("key") String key); } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/resource/dataResource/domain/TsingtaoDataResourceService.java b/renren-admin/src/main/java/io/renren/modules/resource/dataResource/domain/TsingtaoDataResourceService.java index feb4d2df..3293ee83 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/dataResource/domain/TsingtaoDataResourceService.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/dataResource/domain/TsingtaoDataResourceService.java @@ -9,6 +9,7 @@ import org.slf4j.LoggerFactory; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; +import org.springframework.web.client.ResourceAccessException; import org.springframework.web.client.RestTemplate; import java.nio.charset.Charset; @@ -77,6 +78,9 @@ public class TsingtaoDataResourceService extends AbstractDataResourceService { result.put("data", objects); return result; + } catch (ResourceAccessException e) { + logger.error("青岛市资源数据接口连接超时!!!"); + return null; } catch (Exception e) { logger.error("青岛市资源数据调用失败!!!", e); return null; diff --git a/renren-admin/src/main/java/io/renren/modules/resource/dataResource/domain/TsingtaoXHADataResourceService.java b/renren-admin/src/main/java/io/renren/modules/resource/dataResource/domain/TsingtaoXHADataResourceService.java index a8a66e95..4b2fc8bb 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/dataResource/domain/TsingtaoXHADataResourceService.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/dataResource/domain/TsingtaoXHADataResourceService.java @@ -11,6 +11,7 @@ import okhttp3.Request; import okhttp3.Response; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.web.client.ResourceAccessException; import java.util.concurrent.TimeUnit; @@ -47,8 +48,12 @@ public class TsingtaoXHADataResourceService extends AbstractDataResourceService } else { logger.error("西海岸数据资源列表获取失败"); } - } catch (Exception exception) { - logger.error("西海岸数据资源列表获取失败", exception); + } catch (ResourceAccessException e) { + logger.error("西海岸资源数据接口连接超时!!!"); + return null; + } catch (Exception e) { + logger.error("西海岸资源数据调用失败!!!", e); + return null; } return result; } diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java b/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java index db38453c..91a83caf 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java @@ -159,4 +159,7 @@ public interface ResourceService extends CrudService idList = jsonArray.toJavaList(Long.class); @@ -365,7 +375,7 @@ public class ResourceServiceImpl extends CrudServiceImpl knowledgeUUID = jdbcTemplate.queryForList("SELECT note1 FROM tb_data_resource WHERE type ='知识库' AND note1 IS NOT NULL FOR UPDATE;", String.class).stream().distinct().collect(Collectors.toList()); final int pageSize = CPU_NUM * 10; @@ -2024,24 +2034,24 @@ public class ResourceServiceImpl extends CrudServiceImpl infrastructureCount = CompletableFuture.runAsync(() -> { //基础设施 - HashMap queryMap = new HashMap<>(); - queryMap.put("cameraName", keyWorld); - Integer countNew = cameraChannelMapper.selectByParentIdCountNew(queryMap, null, ""); - resultList.add(new HashMap() { - { - put("count", countNew + ""); - put("type", "基础设施"); - } - }); + //2022-11-1 去除摄像头查询 + //CompletableFuture infrastructureCount = CompletableFuture.runAsync(() -> { //基础设施 + // HashMap queryMap = new HashMap<>(); + // queryMap.put("cameraName", keyWorld); + // Integer countNew = cameraChannelMapper.selectByParentIdCountNew(queryMap, null, ""); + // resultList.add(new HashMap() { + // { + // put("count", countNew + ""); + // put("type", "基础设施"); + // } + // }); + // + //}, executor); - }, executor); //统计增加会议室搜索结果 - CompletableFuture meetingRoomCount = CompletableFuture.runAsync(() -> { //会议室 - meetCountNew[0] = tMeetingroomMapper.selectByName(keyWorld).size(); - }, executor); + CompletableFuture meetingRoomCount = CompletableFuture.runAsync(() -> meetCountNew[0] = tMeetingroomMapper.selectByName(keyWorld).size(), executor); - CompletableFuture all = CompletableFuture.allOf(DBresourceCount, dataResourceCount, infrastructureCount, meetingRoomCount); + CompletableFuture all = CompletableFuture.allOf(DBresourceCount, dataResourceCount, meetingRoomCount); all.join(); } @@ -2049,6 +2059,7 @@ public class ResourceServiceImpl extends CrudServiceImpl temp = new ArrayList<>(); resultList.forEach(map -> { @@ -2072,6 +2083,14 @@ public class ResourceServiceImpl extends CrudServiceImpl> typeCountListByApplyDept = resourceDao.selectApplyDeptDetailTypeCountList(params); Map>> typeCountListMap = typeCountListByApplyDept.stream().collect(Collectors.groupingBy(m -> m.get("deptName").toString())); @@ -2248,6 +2267,14 @@ public class ResourceServiceImpl extends CrudServiceImpl> typeCountListByDept = resourceDao.selectDeptDetailTypeCountList(params); Map>> typeCountListMap = typeCountListByDept.stream().collect(Collectors.groupingBy(m -> m.get("deptName").toString())); @@ -2520,4 +2547,11 @@ public class ResourceServiceImpl extends CrudServiceImpl>().ok(list); } + @GetMapping("page") + @ApiOperation("分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataType = "int"), + @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"), + @ApiImplicitParam(name = "deptName", value = "部门名称", paramType = "query", dataType = "String") + }) + public Result> page(@ApiIgnore @RequestParam Map params) { + return new Result>().ok(sysDeptService.page(params)); + } + @GetMapping("listForRegion") @ApiOperation("查询区域管理员管理的部门") @LogOperation("查询区域管理员管理的部门") @@ -66,11 +84,23 @@ public class SysDeptController { @LogOperation("查询所有部门列表") // @RequiresPermissions("sys:dept:list") public Result>> all(String name) { + UserDetail user = SecurityUser.getUser(); List> list = new ArrayList<>(); - if (StringUtils.isNotEmpty(name)) { - list = jdbcTemplate.queryForList(String.format("SELECT id,`name` FROM sys_dept WHERE `name` LIKE '%s';", "%" + name + "%")); - } else { - list = jdbcTemplate.queryForList("SELECT id,`name` FROM sys_dept;"); + if (user.getSuperAdmin() == SuperAdminEnum.YES.value()) { // 超级管理员 + if (StringUtils.isNotEmpty(name)) { + list = jdbcTemplate.queryForList(String.format("SELECT id,`name` FROM sys_dept WHERE `name` LIKE '%s';", "%" + name + "%")); + } else { + list = jdbcTemplate.queryForList("SELECT id,`name` FROM sys_dept;"); + } + } else { // 区域管理员 + SysDeptDTO sysDeptDTO = sysDeptService.get(user.getDeptId()); + if (sysDeptDTO.getDistrict() != null) { + if (StringUtils.isNotEmpty(name)) { + list = jdbcTemplate.queryForList(String.format("SELECT id,`name` FROM sys_dept WHERE `name` LIKE '%s' AND WHERE district = %d;", "%" + name + "%", sysDeptDTO.getDistrict())); + } else { + list = jdbcTemplate.queryForList(String.format("SELECT id,`name` FROM sys_dept WHERE district = %d;", sysDeptDTO.getDistrict())); + } + } } return new Result>>().ok(list); } diff --git a/renren-admin/src/main/java/io/renren/modules/sys/controller/SysUserController.java b/renren-admin/src/main/java/io/renren/modules/sys/controller/SysUserController.java index 143cb205..dfaa4fb5 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/controller/SysUserController.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/controller/SysUserController.java @@ -167,8 +167,8 @@ public class SysUserController { // @RequiresPermissions("sys:user:export") @ApiImplicitParam(name = "username", value = "用户名", paramType = "query", dataType = "String") public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + params.put("export", true); List list = sysUserService.list(params); - ExcelUtils.exportExcelToTarget(response, null, "用户管理", list, SysUserExcel.class); } diff --git a/renren-admin/src/main/java/io/renren/modules/sys/dto/SysDictDataDTO.java b/renren-admin/src/main/java/io/renren/modules/sys/dto/SysDictDataDTO.java index d3d8303d..23b5d42f 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/dto/SysDictDataDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/dto/SysDictDataDTO.java @@ -53,4 +53,8 @@ public class SysDictDataDTO implements Serializable { @ApiModelProperty(value = "更新时间") @JsonProperty(access = JsonProperty.Access.READ_ONLY) private Date updateDate; + + @ApiModelProperty(value = "启用状态") + @JsonProperty(access = JsonProperty.Access.READ_ONLY) + private Integer status; } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/sys/dto/SysDictTypeDTO.java b/renren-admin/src/main/java/io/renren/modules/sys/dto/SysDictTypeDTO.java index 06cfbdba..ef4de77e 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/dto/SysDictTypeDTO.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/dto/SysDictTypeDTO.java @@ -52,6 +52,9 @@ public class SysDictTypeDTO implements Serializable { @JsonProperty(access = JsonProperty.Access.READ_ONLY) private Date updateDate; + @ApiModelProperty(value = "启用状态") + @JsonProperty(access = JsonProperty.Access.READ_ONLY) + private Integer status; @ApiModelProperty(value = "对应字典数据") @JsonProperty(access = JsonProperty.Access.READ_ONLY) diff --git a/renren-admin/src/main/java/io/renren/modules/sys/entity/SysDictDataEntity.java b/renren-admin/src/main/java/io/renren/modules/sys/entity/SysDictDataEntity.java index b010abaa..a087e060 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/entity/SysDictDataEntity.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/entity/SysDictDataEntity.java @@ -47,4 +47,9 @@ public class SysDictDataEntity extends BaseEntity { */ @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateDate; + + /** + * 启用状态 + */ + private Integer status; } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/sys/entity/SysDictTypeEntity.java b/renren-admin/src/main/java/io/renren/modules/sys/entity/SysDictTypeEntity.java index 3ea12338..b9b2c087 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/entity/SysDictTypeEntity.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/entity/SysDictTypeEntity.java @@ -43,4 +43,9 @@ public class SysDictTypeEntity extends BaseEntity { */ @TableField(fill = FieldFill.INSERT_UPDATE) private Date updateDate; + + /** + * 启用状态 + */ + private Integer status; } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/sys/service/SysDeptService.java b/renren-admin/src/main/java/io/renren/modules/sys/service/SysDeptService.java index b2337d7c..3646cd25 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/service/SysDeptService.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/service/SysDeptService.java @@ -1,5 +1,6 @@ package io.renren.modules.sys.service; +import io.renren.common.page.PageData; import io.renren.common.service.BaseService; import io.renren.modules.sys.dto.SysDeptDTO; import io.renren.modules.sys.entity.SysDeptEntity; @@ -12,6 +13,8 @@ import java.util.Map; */ public interface SysDeptService extends BaseService { + PageData page(Map params); + List list(Map params); SysDeptDTO get(Long id); diff --git a/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysDeptServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysDeptServiceImpl.java index 7000bf06..2d098c84 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysDeptServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysDeptServiceImpl.java @@ -3,6 +3,7 @@ package io.renren.modules.sys.service.impl; import io.renren.common.constant.Constant; import io.renren.common.exception.ErrorCode; import io.renren.common.exception.RenException; +import io.renren.common.page.PageData; import io.renren.common.service.impl.BaseServiceImpl; import io.renren.common.utils.ConvertUtils; import io.renren.common.utils.TreeUtils; @@ -23,6 +24,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; @Service @@ -30,6 +32,28 @@ public class SysDeptServiceImpl extends BaseServiceImpl page(Map params) { + long curPage = 1; + long limit = 10; + if (params.get(Constant.PAGE) != null) { + curPage = Long.parseLong((String) params.get(Constant.PAGE)); + } + if (params.get(Constant.LIMIT) != null) { + limit = Long.parseLong((String) params.get(Constant.LIMIT)); + } + //普通管理员,只能查询所属部门及子部门的数据 + UserDetail user = SecurityUser.getUser(); + if (user.getSuperAdmin() == SuperAdminEnum.NO.value()) { + params.put("deptIdList", getSubDeptIdList(user.getDeptId())); + } + //查询部门列表 + List entityList = baseDao.getList(params); + List dtoList = ConvertUtils.sourceToTarget(entityList, SysDeptDTO.class); + List result = dtoList.stream().skip((curPage - 1) * limit).limit(limit).collect(Collectors.toList()); + return new PageData( TreeUtils.build(result), dtoList.size()); + } + @Override public List list(Map params) { //普通管理员,只能查询所属部门及子部门的数据 diff --git a/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java b/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java index c5047c0b..e300c07f 100644 --- a/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java +++ b/renren-admin/src/main/java/io/renren/modules/sys/service/impl/SysUserServiceImpl.java @@ -97,7 +97,9 @@ public class SysUserServiceImpl extends BaseServiceImpl list(Map params) { - //普通管理员,只能查询所属部门及子部门的数据 + //转换成like + paramsToLike(params, "username", "real_name"); + // 普通管理员,只能查询所属部门及子部门的数据 UserDetail user = SecurityUser.getUser(); if (user.getSuperAdmin() == SuperAdminEnum.NO.value()) { params.put("deptIdList", sysDeptService.getSubDeptIdList(user.getDeptId())); @@ -106,6 +108,9 @@ public class SysUserServiceImpl extends BaseServiceImpl entityList = baseDao.getList(params); return ConvertUtils.sourceToTarget(entityList, SysUserDTO.class); diff --git a/renren-admin/src/main/resources/application.yml b/renren-admin/src/main/resources/application.yml index 78bced7a..18f68411 100644 --- a/renren-admin/src/main/resources/application.yml +++ b/renren-admin/src/main/resources/application.yml @@ -18,7 +18,7 @@ big_date: assignee_meet_role_id: 1576849766277849089 # 需要进行统计数目的资源 type/需要进行统计申请的资源类型 applyType census: - type: 组件服务,应用资源,基础设施,数据资源,知识库 + type: 应用资源,组件服务,基础设施,数据资源,知识库 applyType: 应用资源,业务组件,图层服务,开发组件,智能算法 # 海信网关 hisense: @@ -36,7 +36,7 @@ server: min-spare: 30 port: 9090 servlet: - context-path: /renren-admin + context-path: /ucs-admin session: cookie: http-only: true @@ -152,4 +152,6 @@ front: # 基础设施,部门最大申请数量 infrastructure: dept-can-apply-max: 10 - +# 是否发亚微消息 +notice: + yawei: true diff --git a/renren-admin/src/main/resources/db/V7.1__sys_dict_data_col.sql b/renren-admin/src/main/resources/db/V7.1__sys_dict_data_col.sql new file mode 100644 index 00000000..3f6ffc79 --- /dev/null +++ b/renren-admin/src/main/resources/db/V7.1__sys_dict_data_col.sql @@ -0,0 +1,4 @@ +ALTER TABLE `sys_dict_data` +ADD COLUMN `status` int NULL DEFAULT 1 COMMENT '启用状态(0未启用 1启用)' AFTER `update_date`; +ALTER TABLE `sys_dict_type` +ADD COLUMN `status` int NULL DEFAULT 1 COMMENT '启用状态(0未启用 1启用)' AFTER `update_date`; \ No newline at end of file diff --git a/renren-admin/src/main/resources/ehcache.xml b/renren-admin/src/main/resources/ehcache.xml index c9379564..89011744 100644 --- a/renren-admin/src/main/resources/ehcache.xml +++ b/renren-admin/src/main/resources/ehcache.xml @@ -80,4 +80,24 @@ diskPersistent="true" memoryStoreEvictionPolicy="LRU"/> + + + + + + \ No newline at end of file diff --git a/renren-admin/src/main/resources/mapper/notice/SysNoticeDao.xml b/renren-admin/src/main/resources/mapper/notice/SysNoticeDao.xml index a8fedc1c..c8928bad 100644 --- a/renren-admin/src/main/resources/mapper/notice/SysNoticeDao.xml +++ b/renren-admin/src/main/resources/mapper/notice/SysNoticeDao.xml @@ -25,6 +25,7 @@ - update sys_notice set apply_state = #{applyState} where receiver_type_ids like concat('%', #{userId}, '%') and apply_id=#{applyId} + update sys_notice set apply_state = #{applyState} where receiver_type_ids like concat('%', #{userId}, '%') and + apply_id=#{applyId} \ No newline at end of file diff --git a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml index 70976a8b..693acfb8 100644 --- a/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml +++ b/renren-admin/src/main/resources/mapper/resource/ResourceDao.xml @@ -1639,7 +1639,22 @@ + + \ No newline at end of file diff --git a/renren-admin/src/main/resources/mapper/resourceBrowse/ResourceBrowseDao.xml b/renren-admin/src/main/resources/mapper/resourceBrowse/ResourceBrowseDao.xml index 1e63f0eb..7898b0f6 100644 --- a/renren-admin/src/main/resources/mapper/resourceBrowse/ResourceBrowseDao.xml +++ b/renren-admin/src/main/resources/mapper/resourceBrowse/ResourceBrowseDao.xml @@ -54,10 +54,20 @@