From 94442511d947fc6f30b1affe7e88b3032bb3c6b1 Mon Sep 17 00:00:00 2001 From: b2894lxlx <517289602@qq.com> Date: Mon, 11 Nov 2024 01:59:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=9B=AD=E5=8C=BA=E5=86=85?= =?UTF-8?q?=E4=BC=81=E4=B8=9A=E6=95=B0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/system/controller/UserController.java | 6 ++++++ .../com/gxwebsoft/common/system/service/UserService.java | 2 ++ .../common/system/service/impl/UserServiceImpl.java | 8 ++++++++ 3 files changed, 16 insertions(+) diff --git a/src/main/java/com/gxwebsoft/common/system/controller/UserController.java b/src/main/java/com/gxwebsoft/common/system/controller/UserController.java index 9cbe418..4c34c8a 100644 --- a/src/main/java/com/gxwebsoft/common/system/controller/UserController.java +++ b/src/main/java/com/gxwebsoft/common/system/controller/UserController.java @@ -462,4 +462,10 @@ public class UserController extends BaseController { return success("统计成功", userService.userNumInPark(param)); } + @ApiOperation("园区内企业数") + @GetMapping("/orgNumInPark") + public ApiResult orgNumInPark(UserParam param) { + return success("统计成功", userService.orgNumInPark(param)); + } + } diff --git a/src/main/java/com/gxwebsoft/common/system/service/UserService.java b/src/main/java/com/gxwebsoft/common/system/service/UserService.java index 970286c..148c867 100644 --- a/src/main/java/com/gxwebsoft/common/system/service/UserService.java +++ b/src/main/java/com/gxwebsoft/common/system/service/UserService.java @@ -114,4 +114,6 @@ public interface UserService extends IService, UserDetailsService { User getAdminByPhone(String phone); Integer userNumInPark(UserParam param); + + Integer orgNumInPark(UserParam param); } diff --git a/src/main/java/com/gxwebsoft/common/system/service/impl/UserServiceImpl.java b/src/main/java/com/gxwebsoft/common/system/service/impl/UserServiceImpl.java index 129d4f4..a267195 100644 --- a/src/main/java/com/gxwebsoft/common/system/service/impl/UserServiceImpl.java +++ b/src/main/java/com/gxwebsoft/common/system/service/impl/UserServiceImpl.java @@ -302,4 +302,12 @@ public class UserServiceImpl extends ServiceImpl implements Us } return 0; } + + @Override + public Integer orgNumInPark(UserParam param) { + return organizationService.count( + new LambdaQueryWrapper() + .eq(Organization::getPark, param.getPark()) + ); + } }