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()) + ); + } }