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..7a7d3229 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 6b3d82bb..c6f02a0c 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 @@ -678,4 +678,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..d9e6e957 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 @@ -215,4 +215,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/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 + + \ No newline at end of file diff --git a/renren-admin/src/main/resources/mapper/sys/SysDeptDao.xml b/renren-admin/src/main/resources/mapper/sys/SysDeptDao.xml index 45a309ba..f05608a6 100644 --- a/renren-admin/src/main/resources/mapper/sys/SysDeptDao.xml +++ b/renren-admin/src/main/resources/mapper/sys/SysDeptDao.xml @@ -7,12 +7,11 @@ select t1.*,(select t2.name from sys_dept t2 where t2.id=t1.pid)parentName from sys_dept t1 where 1 = 1 AND name != '访客部门' - t1.id in + AND t1.id in #{id} - order by t1.sort asc