新增园区内企业数接口
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -114,4 +114,6 @@ public interface UserService extends IService<User>, UserDetailsService {
|
||||
User getAdminByPhone(String phone);
|
||||
|
||||
Integer userNumInPark(UserParam param);
|
||||
|
||||
Integer orgNumInPark(UserParam param);
|
||||
}
|
||||
|
||||
@@ -302,4 +302,12 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer orgNumInPark(UserParam param) {
|
||||
return organizationService.count(
|
||||
new LambdaQueryWrapper<Organization>()
|
||||
.eq(Organization::getPark, param.getPark())
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user