From ff1351b107b6cd3efa847c9352e496e2fd0bde70 Mon Sep 17 00:00:00 2001 From: hzj <826100833@qq.com> Date: Tue, 25 Nov 2025 13:57:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B5=B7=E9=87=8F=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E9=A9=B1=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pqs-common/common-db/pom.xml | 5 +++++ .../njcn/system/controller/PqDashboardPageController.java | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/pqs-common/common-db/pom.xml b/pqs-common/common-db/pom.xml index 9bd677ae6..399d07938 100644 --- a/pqs-common/common-db/pom.xml +++ b/pqs-common/common-db/pom.xml @@ -57,6 +57,11 @@ mysql mysql-connector-java + + + org.postgresql + postgresql + com.dameng diff --git a/pqs-system/system-boot/src/main/java/com/njcn/system/controller/PqDashboardPageController.java b/pqs-system/system-boot/src/main/java/com/njcn/system/controller/PqDashboardPageController.java index d2bc967aa..ad843a207 100644 --- a/pqs-system/system-boot/src/main/java/com/njcn/system/controller/PqDashboardPageController.java +++ b/pqs-system/system-boot/src/main/java/com/njcn/system/controller/PqDashboardPageController.java @@ -4,12 +4,14 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.njcn.common.pojo.annotation.OperateInfo; import com.njcn.common.pojo.enums.common.LogEnum; import com.njcn.common.pojo.enums.response.CommonResponseEnum; +import com.njcn.common.pojo.exception.BusinessException; import com.njcn.common.pojo.response.HttpResult; import com.njcn.common.utils.HttpResultUtil; import com.njcn.system.pojo.param.PqDashboardPageParam; import com.njcn.system.pojo.po.PqDashboardPage; import com.njcn.system.pojo.vo.PqDashboardPageVO; import com.njcn.system.service.PqDashboardPageService; +import com.njcn.user.enums.UserResponseEnum; import com.njcn.web.controller.BaseController; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; @@ -21,6 +23,7 @@ import org.springframework.beans.BeanUtils; import org.springframework.web.bind.annotation.*; import java.util.List; +import java.util.Objects; /** * Description: @@ -94,6 +97,9 @@ public class PqDashboardPageController extends BaseController { String methodDescribe = getMethodDescribe("queryActivatePage"); PqDashboardPageVO vo = new PqDashboardPageVO(); PqDashboardPage result = pqDashboardPageService.lambdaQuery().eq(PqDashboardPage::getState,1).one(); + if(Objects.isNull(result)){ + throw new BusinessException("暂无激活的驾驶舱页面"); + } BeanUtils.copyProperties(result,vo); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, vo, methodDescribe); }