From 6375d433c6cc6e6902c6ea29105383cacd13713f Mon Sep 17 00:00:00 2001 From: dinggang <2498628697@qq.com> Date: Mon, 31 Oct 2022 16:16:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?1.=E8=83=BD=E5=8A=9B=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E5=BA=94=E7=94=A8=E7=B3=BB=E7=BB=9F=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E5=A2=9E=E5=8A=A0=E6=9F=A5=E8=AF=A2=E8=87=AA=E5=B7=B1?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E4=B8=8A=E6=9E=B6=E5=BA=94=E7=94=A8=E9=99=90?= =?UTF-8?q?=E5=88=B6=202.=E8=83=BD=E5=8A=9B=E4=BD=BF=E7=94=A8=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E6=97=B6=E9=97=B4=E9=94=99=E8=AF=AFbug=203.=E9=83=A8?= =?UTF-8?q?=E9=97=A8=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2bug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ResourceController.java | 8 ++++++++ .../modules/resource/dao/ResourceDao.java | 2 ++ .../resource/service/ResourceService.java | 3 +++ .../service/impl/ResourceServiceImpl.java | 7 +++++++ .../resources/mapper/resource/ResourceDao.xml | 19 ++++++++++++++++++- .../main/resources/mapper/sys/SysDeptDao.xml | 3 +-- 6 files changed, 39 insertions(+), 3 deletions(-) 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 From ca652464d9a815e683f2abbd554854de15e506a7 Mon Sep 17 00:00:00 2001 From: wangliwen Date: Mon, 31 Oct 2022 16:35:21 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E5=8F=91=E9=80=81=E4=BA=9A=E5=BE=AE=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SysNoticeServiceImpl.java | 16 ++++++++++++---- renren-admin/src/main/resources/application.yml | 4 +++- 2 files changed, 15 insertions(+), 5 deletions(-) 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/resources/application.yml b/renren-admin/src/main/resources/application.yml index 4381134f..be426500 100644 --- a/renren-admin/src/main/resources/application.yml +++ b/renren-admin/src/main/resources/application.yml @@ -152,4 +152,6 @@ front: # 基础设施,部门最大申请数量 infrastructure: dept-can-apply-max: 10 - +# 是否发亚微消息 +notice: + yawei: true